From d159aa315c664162e352436c5da1a337362cc4ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Sun, 30 Jan 2022 16:45:37 +0100 Subject: [PATCH] Fix: Rename exceptions --- CHANGELOG.md | 2 ++ ...izeException.php => InvalidIndentSize.php} | 2 +- ...gException.php => InvalidIndentString.php} | 2 +- ...leException.php => InvalidIndentStyle.php} | 2 +- ...ption.php => InvalidJsonEncodeOptions.php} | 2 +- ...edException.php => InvalidJsonEncoded.php} | 2 +- ...Exception.php => InvalidNewLineString.php} | 2 +- ...=> NormalizedInvalidAccordingToSchema.php} | 2 +- ...p => OriginalInvalidAccordingToSchema.php} | 2 +- ...eption.php => SchemaUriCouldNotBeRead.php} | 2 +- ...on.php => SchemaUriCouldNotBeResolved.php} | 2 +- ...eferencesDocumentWithInvalidMediaType.php} | 4 ++-- ...chemaUriReferencesInvalidJsonDocument.php} | 4 ++-- src/Format/Indent.php | 12 +++++----- src/Format/JsonEncodeOptions.php | 4 ++-- src/Format/NewLine.php | 4 ++-- src/Json.php | 4 ++-- src/NormalizerInterface.php | 12 +++++----- src/SchemaNormalizer.php | 12 +++++----- ...tionTest.php => InvalidIndentSizeTest.php} | 8 +++---- ...onTest.php => InvalidIndentStringTest.php} | 8 +++---- ...ionTest.php => InvalidIndentStyleTest.php} | 8 +++---- ...t.php => InvalidJsonEncodeOptionsTest.php} | 8 +++---- ...ionTest.php => InvalidJsonEncodedTest.php} | 8 +++---- ...nTest.php => InvalidNewLineStringTest.php} | 8 +++---- ...ormalizedInvalidAccordingToSchemaTest.php} | 8 +++---- ... OriginalInvalidAccordingToSchemaTest.php} | 8 +++---- ...st.php => SchemaUriCouldNotBeReadTest.php} | 8 +++---- ...hp => SchemaUriCouldNotBeResolvedTest.php} | 8 +++---- ...encesDocumentWithInvalidMediaTypeTest.php} | 8 +++---- ...aUriReferencesInvalidJsonDocumentTest.php} | 8 +++---- test/Unit/Format/IndentTest.php | 12 +++++----- test/Unit/Format/JsonEncodeOptionsTest.php | 4 ++-- test/Unit/Format/NewLineTest.php | 4 ++-- test/Unit/JsonTest.php | 4 ++-- test/Unit/SchemaNormalizerTest.php | 22 +++++++++---------- 36 files changed, 111 insertions(+), 109 deletions(-) rename src/Exception/{InvalidIndentSizeException.php => InvalidIndentSize.php} (90%) rename src/Exception/{InvalidIndentStringException.php => InvalidIndentString.php} (87%) rename src/Exception/{InvalidIndentStyleException.php => InvalidIndentStyle.php} (92%) rename src/Exception/{InvalidJsonEncodeOptionsException.php => InvalidJsonEncodeOptions.php} (88%) rename src/Exception/{InvalidJsonEncodedException.php => InvalidJsonEncoded.php} (88%) rename src/Exception/{InvalidNewLineStringException.php => InvalidNewLineString.php} (88%) rename src/Exception/{NormalizedInvalidAccordingToSchemaException.php => NormalizedInvalidAccordingToSchema.php} (92%) rename src/Exception/{OriginalInvalidAccordingToSchemaException.php => OriginalInvalidAccordingToSchema.php} (92%) rename src/Exception/{SchemaUriCouldNotBeReadException.php => SchemaUriCouldNotBeRead.php} (89%) rename src/Exception/{SchemaUriCouldNotBeResolvedException.php => SchemaUriCouldNotBeResolved.php} (88%) rename src/Exception/{SchemaUriReferencesInvalidJsonDocumentException.php => SchemaUriReferencesDocumentWithInvalidMediaType.php} (88%) rename src/Exception/{SchemaUriReferencesDocumentWithInvalidMediaTypeException.php => SchemaUriReferencesInvalidJsonDocument.php} (82%) rename test/Unit/Exception/{InvalidIndentSizeExceptionTest.php => InvalidIndentSizeTest.php} (84%) rename test/Unit/Exception/{InvalidIndentStringExceptionTest.php => InvalidIndentStringTest.php} (79%) rename test/Unit/Exception/{InvalidIndentStyleExceptionTest.php => InvalidIndentStyleTest.php} (84%) rename test/Unit/Exception/{InvalidJsonEncodeOptionsExceptionTest.php => InvalidJsonEncodeOptionsTest.php} (78%) rename test/Unit/Exception/{InvalidJsonEncodedExceptionTest.php => InvalidJsonEncodedTest.php} (79%) rename test/Unit/Exception/{InvalidNewLineStringExceptionTest.php => InvalidNewLineStringTest.php} (79%) rename test/Unit/Exception/{NormalizedInvalidAccordingToSchemaExceptionTest.php => NormalizedInvalidAccordingToSchemaTest.php} (89%) rename test/Unit/Exception/{OriginalInvalidAccordingToSchemaExceptionTest.php => OriginalInvalidAccordingToSchemaTest.php} (85%) rename test/Unit/Exception/{SchemaUriCouldNotBeReadExceptionTest.php => SchemaUriCouldNotBeReadTest.php} (79%) rename test/Unit/Exception/{SchemaUriCouldNotBeResolvedExceptionTest.php => SchemaUriCouldNotBeResolvedTest.php} (77%) rename test/Unit/Exception/{SchemaUriReferencesDocumentWithInvalidMediaTypeExceptionTest.php => SchemaUriReferencesDocumentWithInvalidMediaTypeTest.php} (83%) rename test/Unit/Exception/{SchemaUriReferencesInvalidJsonDocumentExceptionTest.php => SchemaUriReferencesInvalidJsonDocumentTest.php} (85%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24daebd5..4925b6a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ For a full diff see [`2.2.0...3.0.0`][2.2.0...3.0.0]. - Required `ergebnis/json-schema-validator:^3.0.0` ([#666]), by [@dependabot] - Renamed `Exception\ExceptionInterface` to `Exception\Exception` ([#667]), by [@dependabot] +- Removed `Exception` suffix from all exceptions ([#668]), by [@dependabot] ## [`2.2.0`][2.2.0] @@ -489,6 +490,7 @@ For a full diff see [`5d8b3e2...0.1.0`][5d8b3e2...0.1.0]. [#641]: https://github.com/ergebnis/json-normalizer/pull/641 [#666]: https://github.com/ergebnis/json-normalizer/pull/666 [#667]: https://github.com/ergebnis/json-normalizer/pull/667 +[#668]: https://github.com/ergebnis/json-normalizer/pull/668 [@BackEndTea]: https://github.com/BackEndTea [@dependabot]: https://github.com/dependabot diff --git a/src/Exception/InvalidIndentSizeException.php b/src/Exception/InvalidIndentSize.php similarity index 90% rename from src/Exception/InvalidIndentSizeException.php rename to src/Exception/InvalidIndentSize.php index a8592a00..86745b5c 100644 --- a/src/Exception/InvalidIndentSizeException.php +++ b/src/Exception/InvalidIndentSize.php @@ -13,7 +13,7 @@ namespace Ergebnis\Json\Normalizer\Exception; -final class InvalidIndentSizeException extends \InvalidArgumentException implements Exception +final class InvalidIndentSize extends \InvalidArgumentException implements Exception { private int $size = 0; private int $minimumSize = 0; diff --git a/src/Exception/InvalidIndentStringException.php b/src/Exception/InvalidIndentString.php similarity index 87% rename from src/Exception/InvalidIndentStringException.php rename to src/Exception/InvalidIndentString.php index fa953e3d..a0a17160 100644 --- a/src/Exception/InvalidIndentStringException.php +++ b/src/Exception/InvalidIndentString.php @@ -13,7 +13,7 @@ namespace Ergebnis\Json\Normalizer\Exception; -final class InvalidIndentStringException extends \InvalidArgumentException implements Exception +final class InvalidIndentString extends \InvalidArgumentException implements Exception { private string $string = ''; diff --git a/src/Exception/InvalidIndentStyleException.php b/src/Exception/InvalidIndentStyle.php similarity index 92% rename from src/Exception/InvalidIndentStyleException.php rename to src/Exception/InvalidIndentStyle.php index 4bcf7e58..0287ec06 100644 --- a/src/Exception/InvalidIndentStyleException.php +++ b/src/Exception/InvalidIndentStyle.php @@ -13,7 +13,7 @@ namespace Ergebnis\Json\Normalizer\Exception; -final class InvalidIndentStyleException extends \InvalidArgumentException implements Exception +final class InvalidIndentStyle extends \InvalidArgumentException implements Exception { private string $style = ''; diff --git a/src/Exception/InvalidJsonEncodeOptionsException.php b/src/Exception/InvalidJsonEncodeOptions.php similarity index 88% rename from src/Exception/InvalidJsonEncodeOptionsException.php rename to src/Exception/InvalidJsonEncodeOptions.php index 7eb3dc48..6e75f0db 100644 --- a/src/Exception/InvalidJsonEncodeOptionsException.php +++ b/src/Exception/InvalidJsonEncodeOptions.php @@ -13,7 +13,7 @@ namespace Ergebnis\Json\Normalizer\Exception; -final class InvalidJsonEncodeOptionsException extends \InvalidArgumentException implements Exception +final class InvalidJsonEncodeOptions extends \InvalidArgumentException implements Exception { private int $jsonEncodeOptions = 0; diff --git a/src/Exception/InvalidJsonEncodedException.php b/src/Exception/InvalidJsonEncoded.php similarity index 88% rename from src/Exception/InvalidJsonEncodedException.php rename to src/Exception/InvalidJsonEncoded.php index 12c2a7c7..3efd8176 100644 --- a/src/Exception/InvalidJsonEncodedException.php +++ b/src/Exception/InvalidJsonEncoded.php @@ -13,7 +13,7 @@ namespace Ergebnis\Json\Normalizer\Exception; -final class InvalidJsonEncodedException extends \InvalidArgumentException implements Exception +final class InvalidJsonEncoded extends \InvalidArgumentException implements Exception { private string $encoded = ''; diff --git a/src/Exception/InvalidNewLineStringException.php b/src/Exception/InvalidNewLineString.php similarity index 88% rename from src/Exception/InvalidNewLineStringException.php rename to src/Exception/InvalidNewLineString.php index f72b6bd6..c1553fc9 100644 --- a/src/Exception/InvalidNewLineStringException.php +++ b/src/Exception/InvalidNewLineString.php @@ -13,7 +13,7 @@ namespace Ergebnis\Json\Normalizer\Exception; -final class InvalidNewLineStringException extends \InvalidArgumentException implements Exception +final class InvalidNewLineString extends \InvalidArgumentException implements Exception { private string $string = ''; diff --git a/src/Exception/NormalizedInvalidAccordingToSchemaException.php b/src/Exception/NormalizedInvalidAccordingToSchema.php similarity index 92% rename from src/Exception/NormalizedInvalidAccordingToSchemaException.php rename to src/Exception/NormalizedInvalidAccordingToSchema.php index d936256d..e19c3c65 100644 --- a/src/Exception/NormalizedInvalidAccordingToSchemaException.php +++ b/src/Exception/NormalizedInvalidAccordingToSchema.php @@ -13,7 +13,7 @@ namespace Ergebnis\Json\Normalizer\Exception; -final class NormalizedInvalidAccordingToSchemaException extends \RuntimeException implements Exception +final class NormalizedInvalidAccordingToSchema extends \RuntimeException implements Exception { private string $schemaUri = ''; diff --git a/src/Exception/OriginalInvalidAccordingToSchemaException.php b/src/Exception/OriginalInvalidAccordingToSchema.php similarity index 92% rename from src/Exception/OriginalInvalidAccordingToSchemaException.php rename to src/Exception/OriginalInvalidAccordingToSchema.php index 29d11f1a..866b8d63 100644 --- a/src/Exception/OriginalInvalidAccordingToSchemaException.php +++ b/src/Exception/OriginalInvalidAccordingToSchema.php @@ -13,7 +13,7 @@ namespace Ergebnis\Json\Normalizer\Exception; -final class OriginalInvalidAccordingToSchemaException extends \RuntimeException implements Exception +final class OriginalInvalidAccordingToSchema extends \RuntimeException implements Exception { private string $schemaUri = ''; diff --git a/src/Exception/SchemaUriCouldNotBeReadException.php b/src/Exception/SchemaUriCouldNotBeRead.php similarity index 89% rename from src/Exception/SchemaUriCouldNotBeReadException.php rename to src/Exception/SchemaUriCouldNotBeRead.php index 3b4d4cc3..1c44b601 100644 --- a/src/Exception/SchemaUriCouldNotBeReadException.php +++ b/src/Exception/SchemaUriCouldNotBeRead.php @@ -13,7 +13,7 @@ namespace Ergebnis\Json\Normalizer\Exception; -final class SchemaUriCouldNotBeReadException extends \RuntimeException implements Exception +final class SchemaUriCouldNotBeRead extends \RuntimeException implements Exception { private string $schemaUri = ''; diff --git a/src/Exception/SchemaUriCouldNotBeResolvedException.php b/src/Exception/SchemaUriCouldNotBeResolved.php similarity index 88% rename from src/Exception/SchemaUriCouldNotBeResolvedException.php rename to src/Exception/SchemaUriCouldNotBeResolved.php index 3cc96c66..a6de8439 100644 --- a/src/Exception/SchemaUriCouldNotBeResolvedException.php +++ b/src/Exception/SchemaUriCouldNotBeResolved.php @@ -13,7 +13,7 @@ namespace Ergebnis\Json\Normalizer\Exception; -final class SchemaUriCouldNotBeResolvedException extends \RuntimeException implements Exception +final class SchemaUriCouldNotBeResolved extends \RuntimeException implements Exception { private string $schemaUri = ''; diff --git a/src/Exception/SchemaUriReferencesInvalidJsonDocumentException.php b/src/Exception/SchemaUriReferencesDocumentWithInvalidMediaType.php similarity index 88% rename from src/Exception/SchemaUriReferencesInvalidJsonDocumentException.php rename to src/Exception/SchemaUriReferencesDocumentWithInvalidMediaType.php index aa94448b..938438de 100644 --- a/src/Exception/SchemaUriReferencesInvalidJsonDocumentException.php +++ b/src/Exception/SchemaUriReferencesDocumentWithInvalidMediaType.php @@ -13,14 +13,14 @@ namespace Ergebnis\Json\Normalizer\Exception; -final class SchemaUriReferencesInvalidJsonDocumentException extends \RuntimeException implements Exception +final class SchemaUriReferencesDocumentWithInvalidMediaType extends \RuntimeException implements Exception { private string $schemaUri = ''; public static function fromSchemaUri(string $schemaUri): self { $exception = new self(\sprintf( - 'Schema URI "%s" does not reference a document with valid JSON syntax.', + 'Schema URI "%s" does not reference a document with media type "application/schema+json".', $schemaUri, )); diff --git a/src/Exception/SchemaUriReferencesDocumentWithInvalidMediaTypeException.php b/src/Exception/SchemaUriReferencesInvalidJsonDocument.php similarity index 82% rename from src/Exception/SchemaUriReferencesDocumentWithInvalidMediaTypeException.php rename to src/Exception/SchemaUriReferencesInvalidJsonDocument.php index ac11414a..239fd720 100644 --- a/src/Exception/SchemaUriReferencesDocumentWithInvalidMediaTypeException.php +++ b/src/Exception/SchemaUriReferencesInvalidJsonDocument.php @@ -13,14 +13,14 @@ namespace Ergebnis\Json\Normalizer\Exception; -final class SchemaUriReferencesDocumentWithInvalidMediaTypeException extends \RuntimeException implements Exception +final class SchemaUriReferencesInvalidJsonDocument extends \RuntimeException implements Exception { private string $schemaUri = ''; public static function fromSchemaUri(string $schemaUri): self { $exception = new self(\sprintf( - 'Schema URI "%s" does not reference a document with media type "application/schema+json".', + 'Schema URI "%s" does not reference a document with valid JSON syntax.', $schemaUri, )); diff --git a/src/Format/Indent.php b/src/Format/Indent.php index 7eb07dbd..8cb90d3a 100644 --- a/src/Format/Indent.php +++ b/src/Format/Indent.php @@ -33,20 +33,20 @@ private function __construct(string $value) } /** - * @throws Exception\InvalidIndentStringException + * @throws Exception\InvalidIndentString */ public static function fromString(string $value): self { if (1 !== \preg_match('/^( *|\t+)$/', $value)) { - throw Exception\InvalidIndentStringException::fromString($value); + throw Exception\InvalidIndentString::fromString($value); } return new self($value); } /** - * @throws Exception\InvalidIndentSizeException - * @throws Exception\InvalidIndentStyleException + * @throws Exception\InvalidIndentSize + * @throws Exception\InvalidIndentStyle */ public static function fromSizeAndStyle( int $size, @@ -55,14 +55,14 @@ public static function fromSizeAndStyle( $minimumSize = 1; if ($minimumSize > $size) { - throw Exception\InvalidIndentSizeException::fromSizeAndMinimumSize( + throw Exception\InvalidIndentSize::fromSizeAndMinimumSize( $size, $minimumSize, ); } if (!\array_key_exists($style, self::CHARACTERS)) { - throw Exception\InvalidIndentStyleException::fromStyleAndAllowedStyles( + throw Exception\InvalidIndentStyle::fromStyleAndAllowedStyles( $style, ...\array_keys(self::CHARACTERS), ); diff --git a/src/Format/JsonEncodeOptions.php b/src/Format/JsonEncodeOptions.php index 6a4bed49..0ddcc4e9 100644 --- a/src/Format/JsonEncodeOptions.php +++ b/src/Format/JsonEncodeOptions.php @@ -29,12 +29,12 @@ private function __construct(int $value) } /** - * @throws Exception\InvalidJsonEncodeOptionsException + * @throws Exception\InvalidJsonEncodeOptions */ public static function fromInt(int $value): self { if (0 > $value) { - throw Exception\InvalidJsonEncodeOptionsException::fromJsonEncodeOptions($value); + throw Exception\InvalidJsonEncodeOptions::fromJsonEncodeOptions($value); } return new self($value); diff --git a/src/Format/NewLine.php b/src/Format/NewLine.php index 90e3bc1a..cb20d2f6 100644 --- a/src/Format/NewLine.php +++ b/src/Format/NewLine.php @@ -29,12 +29,12 @@ private function __construct(string $value) } /** - * @throws Exception\InvalidNewLineStringException + * @throws Exception\InvalidNewLineString */ public static function fromString(string $value): self { if (1 !== \preg_match('/^(?>\r\n|\n|\r)$/', $value)) { - throw Exception\InvalidNewLineStringException::fromString($value); + throw Exception\InvalidNewLineString::fromString($value); } return new self($value); diff --git a/src/Json.php b/src/Json.php index ad0ec475..f6bbcbb8 100644 --- a/src/Json.php +++ b/src/Json.php @@ -34,7 +34,7 @@ private function __construct( } /** - * @throws Exception\InvalidJsonEncodedException + * @throws Exception\InvalidJsonEncoded */ public static function fromEncoded(string $encoded): self { @@ -46,7 +46,7 @@ public static function fromEncoded(string $encoded): self \JSON_THROW_ON_ERROR, ); } catch (\JsonException $exception) { - throw Exception\InvalidJsonEncodedException::fromEncoded($encoded); + throw Exception\InvalidJsonEncoded::fromEncoded($encoded); } return new self( diff --git a/src/NormalizerInterface.php b/src/NormalizerInterface.php index 333b4529..91aa2357 100644 --- a/src/NormalizerInterface.php +++ b/src/NormalizerInterface.php @@ -16,12 +16,12 @@ interface NormalizerInterface { /** - * @throws Exception\SchemaUriCouldNotBeResolvedException - * @throws Exception\SchemaUriCouldNotBeReadException - * @throws Exception\SchemaUriReferencesDocumentWithInvalidMediaTypeException - * @throws Exception\SchemaUriReferencesInvalidJsonDocumentException - * @throws Exception\OriginalInvalidAccordingToSchemaException - * @throws Exception\NormalizedInvalidAccordingToSchemaException + * @throws Exception\SchemaUriCouldNotBeResolved + * @throws Exception\SchemaUriCouldNotBeRead + * @throws Exception\SchemaUriReferencesDocumentWithInvalidMediaType + * @throws Exception\SchemaUriReferencesInvalidJsonDocument + * @throws Exception\OriginalInvalidAccordingToSchema + * @throws Exception\NormalizedInvalidAccordingToSchema */ public function normalize(Json $json): Json; } diff --git a/src/SchemaNormalizer.php b/src/SchemaNormalizer.php index af6f3f94..a540462c 100644 --- a/src/SchemaNormalizer.php +++ b/src/SchemaNormalizer.php @@ -42,13 +42,13 @@ public function normalize(Json $json): Json try { $schema = $this->schemaStorage->getSchema($this->schemaUri); } catch (UriResolverException $exception) { - throw Exception\SchemaUriCouldNotBeResolvedException::fromSchemaUri($this->schemaUri); + throw Exception\SchemaUriCouldNotBeResolved::fromSchemaUri($this->schemaUri); } catch (ResourceNotFoundException $exception) { - throw Exception\SchemaUriCouldNotBeReadException::fromSchemaUri($this->schemaUri); + throw Exception\SchemaUriCouldNotBeRead::fromSchemaUri($this->schemaUri); } catch (InvalidSchemaMediaTypeException $exception) { - throw Exception\SchemaUriReferencesDocumentWithInvalidMediaTypeException::fromSchemaUri($this->schemaUri); + throw Exception\SchemaUriReferencesDocumentWithInvalidMediaType::fromSchemaUri($this->schemaUri); } catch (JsonDecodingException $exception) { - throw Exception\SchemaUriReferencesInvalidJsonDocumentException::fromSchemaUri($this->schemaUri); + throw Exception\SchemaUriReferencesInvalidJsonDocument::fromSchemaUri($this->schemaUri); } $resultBeforeNormalization = $this->schemaValidator->validate( @@ -58,7 +58,7 @@ public function normalize(Json $json): Json ); if (!$resultBeforeNormalization->isValid()) { - throw Exception\OriginalInvalidAccordingToSchemaException::fromSchemaUriAndErrors( + throw Exception\OriginalInvalidAccordingToSchema::fromSchemaUriAndErrors( $this->schemaUri, ...\array_map(static function (SchemaValidator\ValidationError $error): string { return $error->message()->toString(); @@ -78,7 +78,7 @@ public function normalize(Json $json): Json ); if (!$resultAfterNormalization->isValid()) { - throw Exception\NormalizedInvalidAccordingToSchemaException::fromSchemaUriAndErrors( + throw Exception\NormalizedInvalidAccordingToSchema::fromSchemaUriAndErrors( $this->schemaUri, ...\array_map(static function (SchemaValidator\ValidationError $error): string { return $error->message()->toString(); diff --git a/test/Unit/Exception/InvalidIndentSizeExceptionTest.php b/test/Unit/Exception/InvalidIndentSizeTest.php similarity index 84% rename from test/Unit/Exception/InvalidIndentSizeExceptionTest.php rename to test/Unit/Exception/InvalidIndentSizeTest.php index 50cdab84..c2c12a4b 100644 --- a/test/Unit/Exception/InvalidIndentSizeExceptionTest.php +++ b/test/Unit/Exception/InvalidIndentSizeTest.php @@ -18,13 +18,13 @@ /** * @internal * - * @covers \Ergebnis\Json\Normalizer\Exception\InvalidIndentSizeException + * @covers \Ergebnis\Json\Normalizer\Exception\InvalidIndentSize */ -final class InvalidIndentSizeExceptionTest extends AbstractExceptionTestCase +final class InvalidIndentSizeTest extends AbstractExceptionTestCase { public function testDefaults(): void { - $exception = new Exception\InvalidIndentSizeException(); + $exception = new Exception\InvalidIndentSize(); self::assertSame(0, $exception->minimumSize()); self::assertSame(0, $exception->size()); @@ -37,7 +37,7 @@ public function testFromSizeAndMinimumSizeReturnsInvalidIndentSizeException(): v $size = $faker->numberBetween(1); $minimumSize = $faker->numberBetween(1); - $exception = Exception\InvalidIndentSizeException::fromSizeAndMinimumSize( + $exception = Exception\InvalidIndentSize::fromSizeAndMinimumSize( $size, $minimumSize, ); diff --git a/test/Unit/Exception/InvalidIndentStringExceptionTest.php b/test/Unit/Exception/InvalidIndentStringTest.php similarity index 79% rename from test/Unit/Exception/InvalidIndentStringExceptionTest.php rename to test/Unit/Exception/InvalidIndentStringTest.php index bb7f54de..9a9dc82d 100644 --- a/test/Unit/Exception/InvalidIndentStringExceptionTest.php +++ b/test/Unit/Exception/InvalidIndentStringTest.php @@ -18,13 +18,13 @@ /** * @internal * - * @covers \Ergebnis\Json\Normalizer\Exception\InvalidIndentStringException + * @covers \Ergebnis\Json\Normalizer\Exception\InvalidIndentString */ -final class InvalidIndentStringExceptionTest extends AbstractExceptionTestCase +final class InvalidIndentStringTest extends AbstractExceptionTestCase { public function testDefaults(): void { - $exception = new Exception\InvalidIndentStringException(); + $exception = new Exception\InvalidIndentString(); self::assertSame('', $exception->string()); } @@ -33,7 +33,7 @@ public function testFromSizeAndMinimumSizeReturnsInvalidIndentStringException(): { $string = self::faker()->word(); - $exception = Exception\InvalidIndentStringException::fromString($string); + $exception = Exception\InvalidIndentString::fromString($string); $message = \sprintf( '"%s" is not a valid indent string', diff --git a/test/Unit/Exception/InvalidIndentStyleExceptionTest.php b/test/Unit/Exception/InvalidIndentStyleTest.php similarity index 84% rename from test/Unit/Exception/InvalidIndentStyleExceptionTest.php rename to test/Unit/Exception/InvalidIndentStyleTest.php index 3798e820..6a988195 100644 --- a/test/Unit/Exception/InvalidIndentStyleExceptionTest.php +++ b/test/Unit/Exception/InvalidIndentStyleTest.php @@ -18,13 +18,13 @@ /** * @internal * - * @covers \Ergebnis\Json\Normalizer\Exception\InvalidIndentStyleException + * @covers \Ergebnis\Json\Normalizer\Exception\InvalidIndentStyle */ -final class InvalidIndentStyleExceptionTest extends AbstractExceptionTestCase +final class InvalidIndentStyleTest extends AbstractExceptionTestCase { public function testDefaults(): void { - $exception = new Exception\InvalidIndentStyleException(); + $exception = new Exception\InvalidIndentStyle(); self::assertSame([], $exception->allowedStyles()); self::assertSame('', $exception->style()); @@ -39,7 +39,7 @@ public function testFromStyleAndAllowedStylesReturnsInvalidIndentStyleException( /** @var string[] $allowedStyles */ $allowedStyles = $faker->words(); - $exception = Exception\InvalidIndentStyleException::fromStyleAndAllowedStyles( + $exception = Exception\InvalidIndentStyle::fromStyleAndAllowedStyles( $style, ...$allowedStyles, ); diff --git a/test/Unit/Exception/InvalidJsonEncodeOptionsExceptionTest.php b/test/Unit/Exception/InvalidJsonEncodeOptionsTest.php similarity index 78% rename from test/Unit/Exception/InvalidJsonEncodeOptionsExceptionTest.php rename to test/Unit/Exception/InvalidJsonEncodeOptionsTest.php index f363dc0f..4c0e5420 100644 --- a/test/Unit/Exception/InvalidJsonEncodeOptionsExceptionTest.php +++ b/test/Unit/Exception/InvalidJsonEncodeOptionsTest.php @@ -18,13 +18,13 @@ /** * @internal * - * @covers \Ergebnis\Json\Normalizer\Exception\InvalidJsonEncodeOptionsException + * @covers \Ergebnis\Json\Normalizer\Exception\InvalidJsonEncodeOptions */ -final class InvalidJsonEncodeOptionsExceptionTest extends AbstractExceptionTestCase +final class InvalidJsonEncodeOptionsTest extends AbstractExceptionTestCase { public function testDefaults(): void { - $exception = new Exception\InvalidJsonEncodeOptionsException(); + $exception = new Exception\InvalidJsonEncodeOptions(); self::assertSame(0, $exception->jsonEncodeOptions()); } @@ -33,7 +33,7 @@ public function testFromJsonEncodeOptionsReturnsInvalidJsonEncodeOptionsExceptio { $jsonEncodeOptions = self::faker()->randomNumber(); - $exception = Exception\InvalidJsonEncodeOptionsException::fromJsonEncodeOptions($jsonEncodeOptions); + $exception = Exception\InvalidJsonEncodeOptions::fromJsonEncodeOptions($jsonEncodeOptions); $message = \sprintf( '"%s" is not valid options for json_encode().', diff --git a/test/Unit/Exception/InvalidJsonEncodedExceptionTest.php b/test/Unit/Exception/InvalidJsonEncodedTest.php similarity index 79% rename from test/Unit/Exception/InvalidJsonEncodedExceptionTest.php rename to test/Unit/Exception/InvalidJsonEncodedTest.php index d6f75672..ed821ccd 100644 --- a/test/Unit/Exception/InvalidJsonEncodedExceptionTest.php +++ b/test/Unit/Exception/InvalidJsonEncodedTest.php @@ -18,13 +18,13 @@ /** * @internal * - * @covers \Ergebnis\Json\Normalizer\Exception\InvalidJsonEncodedException + * @covers \Ergebnis\Json\Normalizer\Exception\InvalidJsonEncoded */ -final class InvalidJsonEncodedExceptionTest extends AbstractExceptionTestCase +final class InvalidJsonEncodedTest extends AbstractExceptionTestCase { public function testDefaults(): void { - $exception = new Exception\InvalidJsonEncodedException(); + $exception = new Exception\InvalidJsonEncoded(); self::assertSame('', $exception->encoded()); } @@ -33,7 +33,7 @@ public function testFromEncodedReturnsInvalidJsonEncodedException(): void { $encoded = self::faker()->sentence(); - $exception = Exception\InvalidJsonEncodedException::fromEncoded($encoded); + $exception = Exception\InvalidJsonEncoded::fromEncoded($encoded); $message = \sprintf( '"%s" is not valid JSON.', diff --git a/test/Unit/Exception/InvalidNewLineStringExceptionTest.php b/test/Unit/Exception/InvalidNewLineStringTest.php similarity index 79% rename from test/Unit/Exception/InvalidNewLineStringExceptionTest.php rename to test/Unit/Exception/InvalidNewLineStringTest.php index bf3770ab..2f7d8810 100644 --- a/test/Unit/Exception/InvalidNewLineStringExceptionTest.php +++ b/test/Unit/Exception/InvalidNewLineStringTest.php @@ -18,13 +18,13 @@ /** * @internal * - * @covers \Ergebnis\Json\Normalizer\Exception\InvalidNewLineStringException + * @covers \Ergebnis\Json\Normalizer\Exception\InvalidNewLineString */ -final class InvalidNewLineStringExceptionTest extends AbstractExceptionTestCase +final class InvalidNewLineStringTest extends AbstractExceptionTestCase { public function testDefaults(): void { - $exception = new Exception\InvalidNewLineStringException(); + $exception = new Exception\InvalidNewLineString(); self::assertSame('', $exception->string()); } @@ -33,7 +33,7 @@ public function testFromSizeAndMinimumSizeReturnsInvalidIndentStringException(): { $string = self::faker()->word(); - $exception = Exception\InvalidNewLineStringException::fromString($string); + $exception = Exception\InvalidNewLineString::fromString($string); $message = \sprintf( '"%s" is not a valid new-line character sequence.', diff --git a/test/Unit/Exception/NormalizedInvalidAccordingToSchemaExceptionTest.php b/test/Unit/Exception/NormalizedInvalidAccordingToSchemaTest.php similarity index 89% rename from test/Unit/Exception/NormalizedInvalidAccordingToSchemaExceptionTest.php rename to test/Unit/Exception/NormalizedInvalidAccordingToSchemaTest.php index 95bef3ef..c5c08006 100644 --- a/test/Unit/Exception/NormalizedInvalidAccordingToSchemaExceptionTest.php +++ b/test/Unit/Exception/NormalizedInvalidAccordingToSchemaTest.php @@ -18,13 +18,13 @@ /** * @internal * - * @covers \Ergebnis\Json\Normalizer\Exception\NormalizedInvalidAccordingToSchemaException + * @covers \Ergebnis\Json\Normalizer\Exception\NormalizedInvalidAccordingToSchema */ -final class NormalizedInvalidAccordingToSchemaExceptionTest extends AbstractExceptionTestCase +final class NormalizedInvalidAccordingToSchemaTest extends AbstractExceptionTestCase { public function testDefaults(): void { - $exception = new Exception\NormalizedInvalidAccordingToSchemaException(); + $exception = new Exception\NormalizedInvalidAccordingToSchema(); self::assertSame('', $exception->schemaUri()); self::assertSame([], $exception->errors()); @@ -42,7 +42,7 @@ public function testFromSchemaUriReturnsNormalizedInvalidAccordingToSchemaExcept $faker->sentence(), ]; - $exception = Exception\NormalizedInvalidAccordingToSchemaException::fromSchemaUriAndErrors( + $exception = Exception\NormalizedInvalidAccordingToSchema::fromSchemaUriAndErrors( $schemaUri, ...$errors, ); diff --git a/test/Unit/Exception/OriginalInvalidAccordingToSchemaExceptionTest.php b/test/Unit/Exception/OriginalInvalidAccordingToSchemaTest.php similarity index 85% rename from test/Unit/Exception/OriginalInvalidAccordingToSchemaExceptionTest.php rename to test/Unit/Exception/OriginalInvalidAccordingToSchemaTest.php index de1c6ce3..23455a29 100644 --- a/test/Unit/Exception/OriginalInvalidAccordingToSchemaExceptionTest.php +++ b/test/Unit/Exception/OriginalInvalidAccordingToSchemaTest.php @@ -18,13 +18,13 @@ /** * @internal * - * @covers \Ergebnis\Json\Normalizer\Exception\OriginalInvalidAccordingToSchemaException + * @covers \Ergebnis\Json\Normalizer\Exception\OriginalInvalidAccordingToSchema */ -final class OriginalInvalidAccordingToSchemaExceptionTest extends AbstractExceptionTestCase +final class OriginalInvalidAccordingToSchemaTest extends AbstractExceptionTestCase { public function testDefaults(): void { - $exception = new Exception\OriginalInvalidAccordingToSchemaException(); + $exception = new Exception\OriginalInvalidAccordingToSchema(); self::assertSame([], $exception->errors()); self::assertSame('', $exception->schemaUri()); @@ -42,7 +42,7 @@ public function testFromSchemaUriAndErrorsReturnsOriginalInvalidAccordingToSchem $faker->sentence(), ]; - $exception = Exception\OriginalInvalidAccordingToSchemaException::fromSchemaUriAndErrors( + $exception = Exception\OriginalInvalidAccordingToSchema::fromSchemaUriAndErrors( $schemaUri, ...$errors, ); diff --git a/test/Unit/Exception/SchemaUriCouldNotBeReadExceptionTest.php b/test/Unit/Exception/SchemaUriCouldNotBeReadTest.php similarity index 79% rename from test/Unit/Exception/SchemaUriCouldNotBeReadExceptionTest.php rename to test/Unit/Exception/SchemaUriCouldNotBeReadTest.php index 343af608..41b79e1e 100644 --- a/test/Unit/Exception/SchemaUriCouldNotBeReadExceptionTest.php +++ b/test/Unit/Exception/SchemaUriCouldNotBeReadTest.php @@ -18,13 +18,13 @@ /** * @internal * - * @covers \Ergebnis\Json\Normalizer\Exception\SchemaUriCouldNotBeReadException + * @covers \Ergebnis\Json\Normalizer\Exception\SchemaUriCouldNotBeRead */ -final class SchemaUriCouldNotBeReadExceptionTest extends AbstractExceptionTestCase +final class SchemaUriCouldNotBeReadTest extends AbstractExceptionTestCase { public function testDefaults(): void { - $exception = new Exception\SchemaUriCouldNotBeReadException(); + $exception = new Exception\SchemaUriCouldNotBeRead(); self::assertSame('', $exception->schemaUri()); } @@ -33,7 +33,7 @@ public function testFromSchemaUriReturnsSchemaUriCouldNotBeReadException(): void { $schemaUri = self::faker()->url(); - $exception = Exception\SchemaUriCouldNotBeReadException::fromSchemaUri($schemaUri); + $exception = Exception\SchemaUriCouldNotBeRead::fromSchemaUri($schemaUri); $message = \sprintf( 'Schema URI "%s" does not reference a document that could be read.', diff --git a/test/Unit/Exception/SchemaUriCouldNotBeResolvedExceptionTest.php b/test/Unit/Exception/SchemaUriCouldNotBeResolvedTest.php similarity index 77% rename from test/Unit/Exception/SchemaUriCouldNotBeResolvedExceptionTest.php rename to test/Unit/Exception/SchemaUriCouldNotBeResolvedTest.php index 64feef57..40fd57ac 100644 --- a/test/Unit/Exception/SchemaUriCouldNotBeResolvedExceptionTest.php +++ b/test/Unit/Exception/SchemaUriCouldNotBeResolvedTest.php @@ -18,13 +18,13 @@ /** * @internal * - * @covers \Ergebnis\Json\Normalizer\Exception\SchemaUriCouldNotBeResolvedException + * @covers \Ergebnis\Json\Normalizer\Exception\SchemaUriCouldNotBeResolved */ -final class SchemaUriCouldNotBeResolvedExceptionTest extends AbstractExceptionTestCase +final class SchemaUriCouldNotBeResolvedTest extends AbstractExceptionTestCase { public function testDefaults(): void { - $exception = new Exception\SchemaUriCouldNotBeResolvedException(); + $exception = new Exception\SchemaUriCouldNotBeResolved(); self::assertSame('', $exception->schemaUri()); } @@ -33,7 +33,7 @@ public function testFromSchemaUriReturnsSchemaUriCouldNotBeResolvedException(): { $schemaUri = self::faker()->url(); - $exception = Exception\SchemaUriCouldNotBeResolvedException::fromSchemaUri($schemaUri); + $exception = Exception\SchemaUriCouldNotBeResolved::fromSchemaUri($schemaUri); $message = \sprintf( 'Schema URI "%s" could not be resolved.', diff --git a/test/Unit/Exception/SchemaUriReferencesDocumentWithInvalidMediaTypeExceptionTest.php b/test/Unit/Exception/SchemaUriReferencesDocumentWithInvalidMediaTypeTest.php similarity index 83% rename from test/Unit/Exception/SchemaUriReferencesDocumentWithInvalidMediaTypeExceptionTest.php rename to test/Unit/Exception/SchemaUriReferencesDocumentWithInvalidMediaTypeTest.php index bd630214..22842304 100644 --- a/test/Unit/Exception/SchemaUriReferencesDocumentWithInvalidMediaTypeExceptionTest.php +++ b/test/Unit/Exception/SchemaUriReferencesDocumentWithInvalidMediaTypeTest.php @@ -18,13 +18,13 @@ /** * @internal * - * @covers \Ergebnis\Json\Normalizer\Exception\SchemaUriReferencesDocumentWithInvalidMediaTypeException + * @covers \Ergebnis\Json\Normalizer\Exception\SchemaUriReferencesDocumentWithInvalidMediaType */ -final class SchemaUriReferencesDocumentWithInvalidMediaTypeExceptionTest extends AbstractExceptionTestCase +final class SchemaUriReferencesDocumentWithInvalidMediaTypeTest extends AbstractExceptionTestCase { public function testDefaults(): void { - $exception = new Exception\SchemaUriReferencesDocumentWithInvalidMediaTypeException(); + $exception = new Exception\SchemaUriReferencesDocumentWithInvalidMediaType(); self::assertSame('', $exception->schemaUri()); } @@ -33,7 +33,7 @@ public function testFromSchemaUriReturnsSchemaUriReferencesDocumentWithInvalidMe { $schemaUri = self::faker()->url(); - $exception = Exception\SchemaUriReferencesDocumentWithInvalidMediaTypeException::fromSchemaUri($schemaUri); + $exception = Exception\SchemaUriReferencesDocumentWithInvalidMediaType::fromSchemaUri($schemaUri); $message = \sprintf( 'Schema URI "%s" does not reference a document with media type "application/schema+json".', diff --git a/test/Unit/Exception/SchemaUriReferencesInvalidJsonDocumentExceptionTest.php b/test/Unit/Exception/SchemaUriReferencesInvalidJsonDocumentTest.php similarity index 85% rename from test/Unit/Exception/SchemaUriReferencesInvalidJsonDocumentExceptionTest.php rename to test/Unit/Exception/SchemaUriReferencesInvalidJsonDocumentTest.php index 5e5a12fa..70c41650 100644 --- a/test/Unit/Exception/SchemaUriReferencesInvalidJsonDocumentExceptionTest.php +++ b/test/Unit/Exception/SchemaUriReferencesInvalidJsonDocumentTest.php @@ -18,13 +18,13 @@ /** * @internal * - * @covers \Ergebnis\Json\Normalizer\Exception\SchemaUriReferencesInvalidJsonDocumentException + * @covers \Ergebnis\Json\Normalizer\Exception\SchemaUriReferencesInvalidJsonDocument */ -final class SchemaUriReferencesInvalidJsonDocumentExceptionTest extends AbstractExceptionTestCase +final class SchemaUriReferencesInvalidJsonDocumentTest extends AbstractExceptionTestCase { public function testDefaults(): void { - $exception = new Exception\SchemaUriReferencesInvalidJsonDocumentException(); + $exception = new Exception\SchemaUriReferencesInvalidJsonDocument(); self::assertSame('', $exception->schemaUri()); } @@ -33,7 +33,7 @@ public function testFromSchemaUriReturnsSchemaUriReferencesDocumentWithInvalidMe { $schemaUri = self::faker()->url(); - $exception = Exception\SchemaUriReferencesInvalidJsonDocumentException::fromSchemaUri($schemaUri); + $exception = Exception\SchemaUriReferencesInvalidJsonDocument::fromSchemaUri($schemaUri); $message = \sprintf( 'Schema URI "%s" does not reference a document with valid JSON syntax.', diff --git a/test/Unit/Format/IndentTest.php b/test/Unit/Format/IndentTest.php index 245318cf..5dafb97d 100644 --- a/test/Unit/Format/IndentTest.php +++ b/test/Unit/Format/IndentTest.php @@ -24,9 +24,9 @@ * * @covers \Ergebnis\Json\Normalizer\Format\Indent * - * @uses \Ergebnis\Json\Normalizer\Exception\InvalidIndentSizeException - * @uses \Ergebnis\Json\Normalizer\Exception\InvalidIndentStringException - * @uses \Ergebnis\Json\Normalizer\Exception\InvalidIndentStyleException + * @uses \Ergebnis\Json\Normalizer\Exception\InvalidIndentSize + * @uses \Ergebnis\Json\Normalizer\Exception\InvalidIndentString + * @uses \Ergebnis\Json\Normalizer\Exception\InvalidIndentStyle * @uses \Ergebnis\Json\Normalizer\Json */ final class IndentTest extends Framework\TestCase @@ -50,7 +50,7 @@ public function testFromSizeAndStyleRejectsInvalidSize(int $size): void { $style = self::faker()->randomElement(\array_keys(Format\Indent::CHARACTERS)); - $this->expectException(Exception\InvalidIndentSizeException::class); + $this->expectException(Exception\InvalidIndentSize::class); Format\Indent::fromSizeAndStyle( $size, @@ -83,7 +83,7 @@ public function testFromSizeAndStyleRejectsInvalidStyle(): void $size = $faker->numberBetween(1); $style = $faker->sentence(); - $this->expectException(Exception\InvalidIndentStyleException::class); + $this->expectException(Exception\InvalidIndentStyle::class); Format\Indent::fromSizeAndStyle( $size, @@ -133,7 +133,7 @@ public function provideSizeStyleAndIndentString(): \Generator */ public function testFromStringRejectsInvalidIndentString(string $string): void { - $this->expectException(Exception\InvalidIndentStringException::class); + $this->expectException(Exception\InvalidIndentString::class); Format\Indent::fromString($string); } diff --git a/test/Unit/Format/JsonEncodeOptionsTest.php b/test/Unit/Format/JsonEncodeOptionsTest.php index a7b54ae4..58c30aae 100644 --- a/test/Unit/Format/JsonEncodeOptionsTest.php +++ b/test/Unit/Format/JsonEncodeOptionsTest.php @@ -24,7 +24,7 @@ * * @covers \Ergebnis\Json\Normalizer\Format\JsonEncodeOptions * - * @uses \Ergebnis\Json\Normalizer\Exception\InvalidJsonEncodeOptionsException + * @uses \Ergebnis\Json\Normalizer\Exception\InvalidJsonEncodeOptions * @uses \Ergebnis\Json\Normalizer\Json */ final class JsonEncodeOptionsTest extends Framework\TestCase @@ -36,7 +36,7 @@ final class JsonEncodeOptionsTest extends Framework\TestCase */ public function testFromIntRejectsInvalidValue(int $value): void { - $this->expectException(Exception\InvalidJsonEncodeOptionsException::class); + $this->expectException(Exception\InvalidJsonEncodeOptions::class); Format\JsonEncodeOptions::fromInt($value); } diff --git a/test/Unit/Format/NewLineTest.php b/test/Unit/Format/NewLineTest.php index ed4bbb45..49625cbc 100644 --- a/test/Unit/Format/NewLineTest.php +++ b/test/Unit/Format/NewLineTest.php @@ -23,7 +23,7 @@ * * @covers \Ergebnis\Json\Normalizer\Format\NewLine * - * @uses \Ergebnis\Json\Normalizer\Exception\InvalidNewLineStringException + * @uses \Ergebnis\Json\Normalizer\Exception\InvalidNewLineString * @uses \Ergebnis\Json\Normalizer\Json */ final class NewLineTest extends Framework\TestCase @@ -33,7 +33,7 @@ final class NewLineTest extends Framework\TestCase */ public function testFromStringRejectsInvalidNewLineString(string $string): void { - $this->expectException(Exception\InvalidNewLineStringException::class); + $this->expectException(Exception\InvalidNewLineString::class); Format\NewLine::fromString($string); } diff --git a/test/Unit/JsonTest.php b/test/Unit/JsonTest.php index 9827f720..ec51a918 100644 --- a/test/Unit/JsonTest.php +++ b/test/Unit/JsonTest.php @@ -23,7 +23,7 @@ * * @covers \Ergebnis\Json\Normalizer\Json * - * @uses \Ergebnis\Json\Normalizer\Exception\InvalidJsonEncodedException + * @uses \Ergebnis\Json\Normalizer\Exception\InvalidJsonEncoded */ final class JsonTest extends Framework\TestCase { @@ -33,7 +33,7 @@ public function testFromEncodedRejectsInvalidEncoded(): void { $string = self::faker()->realText(); - $this->expectException(Exception\InvalidJsonEncodedException::class); + $this->expectException(Exception\InvalidJsonEncoded::class); Json::fromEncoded($string); } diff --git a/test/Unit/SchemaNormalizerTest.php b/test/Unit/SchemaNormalizerTest.php index a2fc52c6..1c18aa7e 100644 --- a/test/Unit/SchemaNormalizerTest.php +++ b/test/Unit/SchemaNormalizerTest.php @@ -28,12 +28,12 @@ * * @covers \Ergebnis\Json\Normalizer\SchemaNormalizer * - * @uses \Ergebnis\Json\Normalizer\Exception\NormalizedInvalidAccordingToSchemaException - * @uses \Ergebnis\Json\Normalizer\Exception\OriginalInvalidAccordingToSchemaException - * @uses \Ergebnis\Json\Normalizer\Exception\SchemaUriCouldNotBeReadException - * @uses \Ergebnis\Json\Normalizer\Exception\SchemaUriCouldNotBeResolvedException - * @uses \Ergebnis\Json\Normalizer\Exception\SchemaUriReferencesDocumentWithInvalidMediaTypeException - * @uses \Ergebnis\Json\Normalizer\Exception\SchemaUriReferencesInvalidJsonDocumentException + * @uses \Ergebnis\Json\Normalizer\Exception\NormalizedInvalidAccordingToSchema + * @uses \Ergebnis\Json\Normalizer\Exception\OriginalInvalidAccordingToSchema + * @uses \Ergebnis\Json\Normalizer\Exception\SchemaUriCouldNotBeRead + * @uses \Ergebnis\Json\Normalizer\Exception\SchemaUriCouldNotBeResolved + * @uses \Ergebnis\Json\Normalizer\Exception\SchemaUriReferencesDocumentWithInvalidMediaType + * @uses \Ergebnis\Json\Normalizer\Exception\SchemaUriReferencesInvalidJsonDocument * @uses \Ergebnis\Json\Normalizer\Json */ final class SchemaNormalizerTest extends AbstractNormalizerTestCase @@ -65,7 +65,7 @@ public function testNormalizeThrowsSchemaUriCouldNotBeResolvedExceptionWhenSchem new SchemaValidator\SchemaValidator(), ); - $this->expectException(Exception\SchemaUriCouldNotBeResolvedException::class); + $this->expectException(Exception\SchemaUriCouldNotBeResolved::class); $normalizer->normalize($json); } @@ -97,7 +97,7 @@ public function testNormalizeThrowsSchemaUriCouldNotBeReadExceptionWhenSchemaUri new SchemaValidator\SchemaValidator(), ); - $this->expectException(Exception\SchemaUriCouldNotBeReadException::class); + $this->expectException(Exception\SchemaUriCouldNotBeRead::class); $normalizer->normalize($json); } @@ -129,7 +129,7 @@ public function testNormalizeThrowsSchemaUriReferencesDocumentWithInvalidMediaTy new SchemaValidator\SchemaValidator(), ); - $this->expectException(Exception\SchemaUriReferencesDocumentWithInvalidMediaTypeException::class); + $this->expectException(Exception\SchemaUriReferencesDocumentWithInvalidMediaType::class); $normalizer->normalize($json); } @@ -161,7 +161,7 @@ public function testNormalizeThrowsRuntimeExceptionIfSchemaUriReferencesResource new SchemaValidator\SchemaValidator(), ); - $this->expectException(Exception\SchemaUriReferencesInvalidJsonDocumentException::class); + $this->expectException(Exception\SchemaUriReferencesInvalidJsonDocument::class); $normalizer->normalize($json); } @@ -203,7 +203,7 @@ public function testNormalizeThrowsOriginalInvalidAccordingToSchemaExceptionWhen new SchemaValidator\SchemaValidator(), ); - $this->expectException(Exception\OriginalInvalidAccordingToSchemaException::class); + $this->expectException(Exception\OriginalInvalidAccordingToSchema::class); $normalizer->normalize($json); }