Skip to content

Commit 3b5c57f

Browse files
committed
tests: add client generated id
1 parent 0f1d9e9 commit 3b5c57f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/Unit/Exception/EventSubscriber/ExceptionListenerTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Symfony\Component\HttpKernel\KernelInterface;
1717
use Symfony\Component\Validator\ConstraintViolationList;
1818
use Undabot\JsonApi\Definition\Encoding\DocumentToPhpArrayEncoderInterface;
19+
use Undabot\JsonApi\Definition\Exception\Request\ClientGeneratedIdIsNotAllowedException;
1920
use Undabot\JsonApi\Definition\Exception\Request\RequestException;
2021
use Undabot\JsonApi\Implementation\Model\Resource\Resource;
2122
use Undabot\SymfonyJsonApi\Exception\EventSubscriber\ExceptionListener;
@@ -80,6 +81,10 @@ public function exceptionProvider(): \Generator
8081
yield 'Exception is Exception instance' => [
8182
new \Exception(),
8283
];
84+
85+
yield 'Exception is ClientGeneratedIdIsNotAllowedException instance' => [
86+
new ClientGeneratedIdIsNotAllowedException(),
87+
];
8388
}
8489

8590
public function testOnKernelExceptionWillSetCorrectEventResponseGivenGivenExceptionIsSupportedAndEventHaveThrowableMethod(): void

0 commit comments

Comments
 (0)