diff --git a/lib/Block/NullBlockDefinition.php b/lib/Block/NullBlockDefinition.php index f1b71e527..5dfb9ca2d 100644 --- a/lib/Block/NullBlockDefinition.php +++ b/lib/Block/NullBlockDefinition.php @@ -113,6 +113,6 @@ public function hasPlugin(string $className): bool public function getHandler(): BlockDefinitionHandlerInterface { - return new class() extends BlockDefinitionHandler {}; + return new class extends BlockDefinitionHandler {}; } } diff --git a/lib/Parameters/ParameterBuilder.php b/lib/Parameters/ParameterBuilder.php index 17e11c4f0..2866a47ff 100644 --- a/lib/Parameters/ParameterBuilder.php +++ b/lib/Parameters/ParameterBuilder.php @@ -442,7 +442,7 @@ function (Options $options, array $value): array { $resolvedOptions['default_value'], $resolvedOptions['label'], $resolvedOptions['groups'], - $resolvedOptions['constraints'] + $resolvedOptions['constraints'], ); return $resolvedOptions; diff --git a/tests/bundles/LayoutsAdminBundle/Form/Admin/Type/ClearLayoutsCacheTypeTest.php b/tests/bundles/LayoutsAdminBundle/Form/Admin/Type/ClearLayoutsCacheTypeTest.php index a2e71ef02..0c97a73ee 100644 --- a/tests/bundles/LayoutsAdminBundle/Form/Admin/Type/ClearLayoutsCacheTypeTest.php +++ b/tests/bundles/LayoutsAdminBundle/Form/Admin/Type/ClearLayoutsCacheTypeTest.php @@ -97,7 +97,7 @@ public function testConfigureOptions(): void public function testConfigureOptionsWithInvalidLayouts(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "layouts" with value array is expected to be of type "Netgen\\Layouts\\API\\Values\\Layout\\LayoutList", but is of type "array".'); + $this->expectExceptionMessage('The option "layouts" with value array is expected to be of type "Netgen\Layouts\API\Values\Layout\LayoutList", but is of type "array".'); $optionsResolver = new OptionsResolver(); diff --git a/tests/bundles/LayoutsBundle/Templating/Twig/Node/RenderZoneTest.php b/tests/bundles/LayoutsBundle/Templating/Twig/Node/RenderZoneTest.php index fe2eedc2a..ba5e24ae9 100644 --- a/tests/bundles/LayoutsBundle/Templating/Twig/Node/RenderZoneTest.php +++ b/tests/bundles/LayoutsBundle/Templating/Twig/Node/RenderZoneTest.php @@ -70,8 +70,7 @@ public static function getTests(): array \$nglContext = {$contextNodeGetter}; \$nglTemplate = new {$templateClass}(\$this, \$context, \$blocks); \$this->env->getRuntime("{$runtimeClass}")->displayZone(\$context["nglayouts"]->getLayout(), \$nglZoneIdentifier, \$nglContext, \$nglTemplate); - EOT - , + EOT, $environment, ], [ @@ -83,8 +82,7 @@ public static function getTests(): array \$nglContext = {$contextNodeGetter}; \$nglTemplate = new {$templateClass}(\$this, \$context, \$blocks); \$this->env->getRuntime("{$runtimeClass}")->displayZone(\$context["nglayouts"]->getLayout(), \$nglZoneIdentifier, \$nglContext, \$nglTemplate); - EOT - , + EOT, $environment, ], [ @@ -96,8 +94,7 @@ public static function getTests(): array \$nglContext = {$viewInterface}::CONTEXT_DEFAULT; \$nglTemplate = new {$templateClass}(\$this, \$context, \$blocks); \$this->env->getRuntime("{$runtimeClass}")->displayZone(\$context["nglayouts"]->getLayout(), \$nglZoneIdentifier, \$nglContext, \$nglTemplate); - EOT - , + EOT, $environment, ], [ @@ -109,8 +106,7 @@ public static function getTests(): array \$nglContext = {$viewInterface}::CONTEXT_DEFAULT; \$nglTemplate = new {$templateClass}(\$this, \$context, \$blocks); \$this->env->getRuntime("{$runtimeClass}")->displayZone(\$context["nglayouts"]->getLayout(), \$nglZoneIdentifier, \$nglContext, \$nglTemplate); - EOT - , + EOT, $environment, ], ]; diff --git a/tests/bundles/LayoutsBundle/Templating/Twig/Runtime/CollectionPagerRuntimeTest.php b/tests/bundles/LayoutsBundle/Templating/Twig/Runtime/CollectionPagerRuntimeTest.php index 2103d6adb..f50c802c5 100644 --- a/tests/bundles/LayoutsBundle/Templating/Twig/Runtime/CollectionPagerRuntimeTest.php +++ b/tests/bundles/LayoutsBundle/Templating/Twig/Runtime/CollectionPagerRuntimeTest.php @@ -124,7 +124,7 @@ public function testGetCollectionPageUrl(): void public function testGetCollectionPageUrlThrowsInvalidArgumentExceptionWithInvalidPage(int $page): void { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessageMatches('/^Argument "page" has an invalid value\\. Page -?\\d+ is out of bounds$/'); + $this->expectExceptionMessageMatches('/^Argument "page" has an invalid value\. Page -?\d+ is out of bounds$/'); $pagerfanta = $this->createMock(Pagerfanta::class); $pagerfanta diff --git a/tests/bundles/LayoutsBundle/Templating/Twig/Runtime/RenderingRuntimeTest.php b/tests/bundles/LayoutsBundle/Templating/Twig/Runtime/RenderingRuntimeTest.php index 338f6cebe..53e0bcc34 100644 --- a/tests/bundles/LayoutsBundle/Templating/Twig/Runtime/RenderingRuntimeTest.php +++ b/tests/bundles/LayoutsBundle/Templating/Twig/Runtime/RenderingRuntimeTest.php @@ -1100,7 +1100,7 @@ public function testRenderValueThrowsExceptionInDebug(): void public function testRenderStringTemplate(): void { $objectWithoutCast = Block::fromArray(['id' => Uuid::uuid4()]); - $objectWithCast = new class() { + $objectWithCast = new class { public function __toString(): string { return 'foo'; diff --git a/tests/lib/Block/Form/ContentEditTypeTest.php b/tests/lib/Block/Form/ContentEditTypeTest.php index 6b97431fa..a37f53119 100644 --- a/tests/lib/Block/Form/ContentEditTypeTest.php +++ b/tests/lib/Block/Form/ContentEditTypeTest.php @@ -241,7 +241,7 @@ public function testConfigureOptionsWithMissingBlock(): void public function testConfigureOptionsWithInvalidBlock(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "block" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\Block\\Block", but is of type "string".'); + $this->expectExceptionMessage('The option "block" with value "" is expected to be of type "Netgen\Layouts\API\Values\Block\Block", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); @@ -261,7 +261,7 @@ public function testConfigureOptionsWithInvalidBlock(): void public function testConfigureOptionsWithInvalidData(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\Block\\BlockUpdateStruct", but is of type "string".'); + $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\Layouts\API\Values\Block\BlockUpdateStruct", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); diff --git a/tests/lib/Block/Form/DesignEditTypeTest.php b/tests/lib/Block/Form/DesignEditTypeTest.php index 51f55e8b9..67bc1167f 100644 --- a/tests/lib/Block/Form/DesignEditTypeTest.php +++ b/tests/lib/Block/Form/DesignEditTypeTest.php @@ -255,7 +255,7 @@ public function testConfigureOptionsWithMissingBlock(): void public function testConfigureOptionsWithInvalidBlock(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "block" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\Block\\Block", but is of type "string".'); + $this->expectExceptionMessage('The option "block" with value "" is expected to be of type "Netgen\Layouts\API\Values\Block\Block", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); @@ -275,7 +275,7 @@ public function testConfigureOptionsWithInvalidBlock(): void public function testConfigureOptionsWithInvalidData(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\Block\\BlockUpdateStruct", but is of type "string".'); + $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\Layouts\API\Values\Block\BlockUpdateStruct", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); diff --git a/tests/lib/Block/Form/FullEditTypeTest.php b/tests/lib/Block/Form/FullEditTypeTest.php index a3230f344..fefe64b59 100644 --- a/tests/lib/Block/Form/FullEditTypeTest.php +++ b/tests/lib/Block/Form/FullEditTypeTest.php @@ -253,7 +253,7 @@ public function testConfigureOptionsWithMissingBlock(): void public function testConfigureOptionsWithInvalidBlock(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "block" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\Block\\Block", but is of type "string".'); + $this->expectExceptionMessage('The option "block" with value "" is expected to be of type "Netgen\Layouts\API\Values\Block\Block", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); @@ -273,7 +273,7 @@ public function testConfigureOptionsWithInvalidBlock(): void public function testConfigureOptionsWithInvalidData(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\Block\\BlockUpdateStruct", but is of type "string".'); + $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\Layouts\API\Values\Block\BlockUpdateStruct", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); diff --git a/tests/lib/Collection/Form/CollectionEditTypeTest.php b/tests/lib/Collection/Form/CollectionEditTypeTest.php index fa0dd8c22..a6505b75e 100644 --- a/tests/lib/Collection/Form/CollectionEditTypeTest.php +++ b/tests/lib/Collection/Form/CollectionEditTypeTest.php @@ -148,7 +148,7 @@ public function testConfigureOptionsWithMissingQuery(): void public function testConfigureOptionsWithInvalidQueryType(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "collection" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\Collection\\Collection", but is of type "string".'); + $this->expectExceptionMessage('The option "collection" with value "" is expected to be of type "Netgen\Layouts\API\Values\Collection\Collection", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); @@ -168,7 +168,7 @@ public function testConfigureOptionsWithInvalidQueryType(): void public function testConfigureOptionsWithInvalidData(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\Collection\\CollectionUpdateStruct", but is of type "string".'); + $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\Layouts\API\Values\Collection\CollectionUpdateStruct", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); diff --git a/tests/lib/Collection/Form/QueryEditTypeTest.php b/tests/lib/Collection/Form/QueryEditTypeTest.php index fcf2cf2b3..076f444db 100644 --- a/tests/lib/Collection/Form/QueryEditTypeTest.php +++ b/tests/lib/Collection/Form/QueryEditTypeTest.php @@ -176,7 +176,7 @@ public function testConfigureOptionsWithMissingQuery(): void public function testConfigureOptionsWithInvalidQueryType(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "query" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\Collection\\Query", but is of type "string".'); + $this->expectExceptionMessage('The option "query" with value "" is expected to be of type "Netgen\Layouts\API\Values\Collection\Query", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); @@ -196,7 +196,7 @@ public function testConfigureOptionsWithInvalidQueryType(): void public function testConfigureOptionsWithInvalidData(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\Collection\\QueryUpdateStruct", but is of type "string".'); + $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\Layouts\API\Values\Collection\QueryUpdateStruct", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); diff --git a/tests/lib/Collection/Result/Pagerfanta/View/CollectionViewTest.php b/tests/lib/Collection/Result/Pagerfanta/View/CollectionViewTest.php index 48bce0289..93cddb49e 100644 --- a/tests/lib/Collection/Result/Pagerfanta/View/CollectionViewTest.php +++ b/tests/lib/Collection/Result/Pagerfanta/View/CollectionViewTest.php @@ -109,7 +109,7 @@ public function testRenderWithOverriddenTemplate(): void public function testRenderThrowsInvalidArgumentExceptionWithNoBlock(): void { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('To render the collection view, "block" option must be an instance of Netgen\\Layouts\\API\\Values\\Block\\Block'); + $this->expectExceptionMessage('To render the collection view, "block" option must be an instance of Netgen\Layouts\API\Values\Block\Block'); $pagerMock = $this->createMock(PagerfantaInterface::class); @@ -131,7 +131,7 @@ public function testRenderThrowsInvalidArgumentExceptionWithNoBlock(): void public function testRenderThrowsInvalidArgumentExceptionWithInvalidBlock(): void { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('To render the collection view, "block" option must be an instance of Netgen\\Layouts\\API\\Values\\Block\\Block'); + $this->expectExceptionMessage('To render the collection view, "block" option must be an instance of Netgen\Layouts\API\Values\Block\Block'); $pagerMock = $this->createMock(PagerfantaInterface::class); diff --git a/tests/lib/Config/Form/EditTypeTest.php b/tests/lib/Config/Form/EditTypeTest.php index 93aac6e26..c6f59c6b3 100644 --- a/tests/lib/Config/Form/EditTypeTest.php +++ b/tests/lib/Config/Form/EditTypeTest.php @@ -224,7 +224,7 @@ public function testConfigureOptionsWithMissingValue(): void public function testConfigureOptionsWithInvalidValue(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "configurable" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\Config\\ConfigAwareValue", but is of type "string".'); + $this->expectExceptionMessage('The option "configurable" with value "" is expected to be of type "Netgen\Layouts\API\Values\Config\ConfigAwareValue", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); @@ -286,7 +286,7 @@ public function testConfigureOptionsWithInvalidLabelPrefix(): void public function testConfigureOptionsWithInvalidData(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\Config\\ConfigAwareStruct", but is of type "string".'); + $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\Layouts\API\Values\Config\ConfigAwareStruct", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); diff --git a/tests/lib/Item/CmsItemBuilderTest.php b/tests/lib/Item/CmsItemBuilderTest.php index 4957a9132..d94685774 100644 --- a/tests/lib/Item/CmsItemBuilderTest.php +++ b/tests/lib/Item/CmsItemBuilderTest.php @@ -49,7 +49,7 @@ public function testBuild(): void public function testBuildThrowsValueException(): void { $this->expectException(ValueException::class); - $this->expectExceptionMessage('Value converter for "Netgen\\Layouts\\Tests\\Item\\Stubs\\Value" type does not exist.'); + $this->expectExceptionMessage('Value converter for "Netgen\Layouts\Tests\Item\Stubs\Value" type does not exist.'); /** @var iterable<\Netgen\Layouts\Item\ValueConverterInterface> $valueConverters */ $valueConverters = [new UnsupportedValueConverter()]; diff --git a/tests/lib/Layout/Form/CopyTypeTest.php b/tests/lib/Layout/Form/CopyTypeTest.php index f4de1c806..3f23b185f 100644 --- a/tests/lib/Layout/Form/CopyTypeTest.php +++ b/tests/lib/Layout/Form/CopyTypeTest.php @@ -106,7 +106,7 @@ public function testConfigureOptionsWithMissingLayout(): void public function testConfigureOptionsWithInvalidLayout(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "layout" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\Layout\\Layout", but is of type "string".'); + $this->expectExceptionMessage('The option "layout" with value "" is expected to be of type "Netgen\Layouts\API\Values\Layout\Layout", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); @@ -126,7 +126,7 @@ public function testConfigureOptionsWithInvalidLayout(): void public function testConfigureOptionsWithInvalidData(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\Layout\\LayoutCopyStruct", but is of type "string".'); + $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\Layouts\API\Values\Layout\LayoutCopyStruct", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); diff --git a/tests/lib/Layout/Form/CreateTypeTest.php b/tests/lib/Layout/Form/CreateTypeTest.php index f17058df6..af89115da 100644 --- a/tests/lib/Layout/Form/CreateTypeTest.php +++ b/tests/lib/Layout/Form/CreateTypeTest.php @@ -119,7 +119,7 @@ public function testConfigureOptions(): void public function testConfigureOptionsWithInvalidData(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\Layout\\LayoutCreateStruct", but is of type "string".'); + $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\Layouts\API\Values\Layout\LayoutCreateStruct", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); diff --git a/tests/lib/Layout/Form/EditTypeTest.php b/tests/lib/Layout/Form/EditTypeTest.php index a00f21c60..d6c686b56 100644 --- a/tests/lib/Layout/Form/EditTypeTest.php +++ b/tests/lib/Layout/Form/EditTypeTest.php @@ -107,7 +107,7 @@ public function testConfigureOptionsWithMissingLayout(): void public function testConfigureOptionsWithInvalidLayout(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "layout" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\Layout\\Layout", but is of type "string".'); + $this->expectExceptionMessage('The option "layout" with value "" is expected to be of type "Netgen\Layouts\API\Values\Layout\Layout", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); @@ -127,7 +127,7 @@ public function testConfigureOptionsWithInvalidLayout(): void public function testConfigureOptionsWithInvalidData(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\Layout\\LayoutUpdateStruct", but is of type "string".'); + $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\Layouts\API\Values\Layout\LayoutUpdateStruct", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); diff --git a/tests/lib/Layout/Resolver/Form/ConditionTypeTest.php b/tests/lib/Layout/Resolver/Form/ConditionTypeTest.php index ef54dab89..b42476027 100644 --- a/tests/lib/Layout/Resolver/Form/ConditionTypeTest.php +++ b/tests/lib/Layout/Resolver/Form/ConditionTypeTest.php @@ -89,7 +89,7 @@ public function testConfigureOptionsWithMissingConditionType(): void public function testConfigureOptionsWithInvalidConditionType(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "condition_type" with value "" is expected to be of type "Netgen\\Layouts\\Layout\\Resolver\\ConditionTypeInterface", but is of type "string".'); + $this->expectExceptionMessage('The option "condition_type" with value "" is expected to be of type "Netgen\Layouts\Layout\Resolver\ConditionTypeInterface", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); @@ -109,7 +109,7 @@ public function testConfigureOptionsWithInvalidConditionType(): void public function testConfigureOptionsWithInvalidData(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\LayoutResolver\\ConditionStruct", but is of type "string".'); + $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\Layouts\API\Values\LayoutResolver\ConditionStruct", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); diff --git a/tests/lib/Layout/Resolver/Form/RuleTypeTest.php b/tests/lib/Layout/Resolver/Form/RuleTypeTest.php index ba07c90ff..6f6320a40 100644 --- a/tests/lib/Layout/Resolver/Form/RuleTypeTest.php +++ b/tests/lib/Layout/Resolver/Form/RuleTypeTest.php @@ -69,7 +69,7 @@ public function testConfigureOptions(): void public function testConfigureOptionsWithInvalidData(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\LayoutResolver\\RuleUpdateStruct", but is of type "string".'); + $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\Layouts\API\Values\LayoutResolver\RuleUpdateStruct", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); diff --git a/tests/lib/Layout/Resolver/Form/TargetTypeTest.php b/tests/lib/Layout/Resolver/Form/TargetTypeTest.php index e9410c393..f3bcfcd17 100644 --- a/tests/lib/Layout/Resolver/Form/TargetTypeTest.php +++ b/tests/lib/Layout/Resolver/Form/TargetTypeTest.php @@ -89,7 +89,7 @@ public function testConfigureOptionsWithMissingTargetType(): void public function testConfigureOptionsWithInvalidTargetType(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "target_type" with value "" is expected to be of type "Netgen\\Layouts\\Layout\\Resolver\\TargetTypeInterface", but is of type "string".'); + $this->expectExceptionMessage('The option "target_type" with value "" is expected to be of type "Netgen\Layouts\Layout\Resolver\TargetTypeInterface", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); @@ -109,7 +109,7 @@ public function testConfigureOptionsWithInvalidTargetType(): void public function testConfigureOptionsWithInvalidData(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\\Layouts\\API\\Values\\LayoutResolver\\TargetStruct", but is of type "string".'); + $this->expectExceptionMessage('The option "data" with value "" is expected to be of type "Netgen\Layouts\API\Values\LayoutResolver\TargetStruct", but is of type "string".'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); diff --git a/tests/lib/Parameters/Form/Extension/ParametersTypeExtensionTest.php b/tests/lib/Parameters/Form/Extension/ParametersTypeExtensionTest.php index a8749d29b..7411b8c18 100644 --- a/tests/lib/Parameters/Form/Extension/ParametersTypeExtensionTest.php +++ b/tests/lib/Parameters/Form/Extension/ParametersTypeExtensionTest.php @@ -115,7 +115,7 @@ public function testConfigureOptionsWithEmptyParameters(): void public function testConfigureOptionsWithInvalidParameters(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessage('The option "ngl_parameter_definition" with value "parameter_definition" is expected to be of type "Netgen\\Layouts\\Parameters\\ParameterDefinition", but is of type "string".'); + $this->expectExceptionMessage('The option "ngl_parameter_definition" with value "parameter_definition" is expected to be of type "Netgen\Layouts\Parameters\ParameterDefinition", but is of type "string".'); $optionsResolver = new OptionsResolver(); $this->formTypeExtension->configureOptions($optionsResolver); diff --git a/tests/lib/Parameters/Form/Type/ParametersTypeTest.php b/tests/lib/Parameters/Form/Type/ParametersTypeTest.php index fea798edf..1120daf90 100644 --- a/tests/lib/Parameters/Form/Type/ParametersTypeTest.php +++ b/tests/lib/Parameters/Form/Type/ParametersTypeTest.php @@ -300,7 +300,7 @@ public function testConfigureOptionsWithMissingParameters(): void public function testConfigureOptionsWithInvalidParameters(): void { $this->expectException(InvalidOptionsException::class); - $this->expectExceptionMessageMatches('/^The option "parameter_definitions" with value null is expected to be of type "Netgen\\\\Layouts\\\\Parameters\\\\ParameterDefinitionCollectionInterface", but is of type "(NULL|null)".$/'); + $this->expectExceptionMessageMatches('/^The option "parameter_definitions" with value null is expected to be of type "Netgen\\\Layouts\\\Parameters\\\ParameterDefinitionCollectionInterface", but is of type "(NULL|null)".$/'); $optionsResolver = new OptionsResolver(); $optionsResolver->setDefined('data'); diff --git a/tests/lib/Transfer/Output/OutputVisitorTest.php b/tests/lib/Transfer/Output/OutputVisitorTest.php index 70fc436fd..a38e32286 100644 --- a/tests/lib/Transfer/Output/OutputVisitorTest.php +++ b/tests/lib/Transfer/Output/OutputVisitorTest.php @@ -37,7 +37,7 @@ public function testVisit(): void public function testVisitWithNoAcceptedVisitorThrowsRuntimeException(): void { $this->expectException(RuntimeException::class); - $this->expectExceptionMessage('No visitor available for value of type \'Netgen\\Layouts\\API\\Values\\Block\\Block\''); + $this->expectExceptionMessage('No visitor available for value of type \'Netgen\Layouts\API\Values\Block\Block\''); $this->visitor = new OutputVisitor([]); diff --git a/tests/lib/Validator/BlockItemViewTypeValidatorTest.php b/tests/lib/Validator/BlockItemViewTypeValidatorTest.php index 45a50a758..c71982dcc 100644 --- a/tests/lib/Validator/BlockItemViewTypeValidatorTest.php +++ b/tests/lib/Validator/BlockItemViewTypeValidatorTest.php @@ -51,7 +51,7 @@ public function testValidate(string $viewType, string $value, bool $isValid): vo public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessage('Expected argument of type "Netgen\\Layouts\\Validator\\Constraint\\BlockItemViewType", "Symfony\\Component\\Validator\\Constraints\\NotBlank" given'); + $this->expectExceptionMessage('Expected argument of type "Netgen\Layouts\Validator\Constraint\BlockItemViewType", "Symfony\Component\Validator\Constraints\NotBlank" given'); $this->constraint = new NotBlank(); $this->assertValid(true, 'standard'); diff --git a/tests/lib/Validator/BlockViewTypeValidatorTest.php b/tests/lib/Validator/BlockViewTypeValidatorTest.php index 447de3f68..5a90b1bf7 100644 --- a/tests/lib/Validator/BlockViewTypeValidatorTest.php +++ b/tests/lib/Validator/BlockViewTypeValidatorTest.php @@ -49,7 +49,7 @@ public function testValidate(string $value, bool $isValid): void public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessage('Expected argument of type "Netgen\\Layouts\\Validator\\Constraint\\BlockViewType", "Symfony\\Component\\Validator\\Constraints\\NotBlank" given'); + $this->expectExceptionMessage('Expected argument of type "Netgen\Layouts\Validator\Constraint\BlockViewType", "Symfony\Component\Validator\Constraints\NotBlank" given'); $this->constraint = new NotBlank(); $this->assertValid(true, 'large'); diff --git a/tests/lib/Validator/ConditionType/TimeValidatorTest.php b/tests/lib/Validator/ConditionType/TimeValidatorTest.php index e0e536899..fb852834c 100644 --- a/tests/lib/Validator/ConditionType/TimeValidatorTest.php +++ b/tests/lib/Validator/ConditionType/TimeValidatorTest.php @@ -39,7 +39,7 @@ public function testValidate(?array $value, bool $isValid): void public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessage('Expected argument of type "Netgen\\Layouts\\Validator\\Constraint\\ConditionType\\Time", "Symfony\\Component\\Validator\\Constraints\\NotBlank" given'); + $this->expectExceptionMessage('Expected argument of type "Netgen\Layouts\Validator\Constraint\ConditionType\Time", "Symfony\Component\Validator\Constraints\NotBlank" given'); $this->constraint = new NotBlank(); $this->assertValid(true, new DateTimeImmutable()); diff --git a/tests/lib/Validator/DateTimeValidatorTest.php b/tests/lib/Validator/DateTimeValidatorTest.php index 23f5c83e2..6b3fffd4d 100644 --- a/tests/lib/Validator/DateTimeValidatorTest.php +++ b/tests/lib/Validator/DateTimeValidatorTest.php @@ -41,7 +41,7 @@ public function testValidate($value, bool $isValid): void public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessage('Expected argument of type "Netgen\\Layouts\\Validator\\Constraint\\DateTime", "Symfony\\Component\\Validator\\Constraints\\NotBlank" given'); + $this->expectExceptionMessage('Expected argument of type "Netgen\Layouts\Validator\Constraint\DateTime", "Symfony\Component\Validator\Constraints\NotBlank" given'); $this->constraint = new NotBlank(); $this->assertValid(true, new DateTimeImmutable()); diff --git a/tests/lib/Validator/LayoutNameValidatorTest.php b/tests/lib/Validator/LayoutNameValidatorTest.php index 517581a73..f982599cc 100644 --- a/tests/lib/Validator/LayoutNameValidatorTest.php +++ b/tests/lib/Validator/LayoutNameValidatorTest.php @@ -49,7 +49,7 @@ public function testValidate(?string $value, bool $isValid): void public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessage('Expected argument of type "Netgen\\Layouts\\Validator\\Constraint\\LayoutName", "Symfony\\Component\\Validator\\Constraints\\NotBlank" given'); + $this->expectExceptionMessage('Expected argument of type "Netgen\Layouts\Validator\Constraint\LayoutName", "Symfony\Component\Validator\Constraints\NotBlank" given'); $this->constraint = new NotBlank(); $this->assertValid(true, 'My layout'); diff --git a/tests/lib/Validator/LocaleValidatorTest.php b/tests/lib/Validator/LocaleValidatorTest.php index d76c8550d..e8e1b68c3 100644 --- a/tests/lib/Validator/LocaleValidatorTest.php +++ b/tests/lib/Validator/LocaleValidatorTest.php @@ -36,7 +36,7 @@ public function testValidate(?string $value, bool $isValid): void public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessage('Expected argument of type "Netgen\\Layouts\\Validator\\Constraint\\Locale", "Symfony\\Component\\Validator\\Constraints\\NotBlank" given'); + $this->expectExceptionMessage('Expected argument of type "Netgen\Layouts\Validator\Constraint\Locale", "Symfony\Component\Validator\Constraints\NotBlank" given'); $this->constraint = new NotBlank(); $this->assertValid(true, 'hr_HR'); diff --git a/tests/lib/Validator/Parameters/ItemLinkValidatorTest.php b/tests/lib/Validator/Parameters/ItemLinkValidatorTest.php index 05fea22e9..323d3396b 100644 --- a/tests/lib/Validator/Parameters/ItemLinkValidatorTest.php +++ b/tests/lib/Validator/Parameters/ItemLinkValidatorTest.php @@ -67,7 +67,7 @@ public function testValidateWithInvalidItem(): void public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessage('Expected argument of type "Netgen\\Layouts\\Validator\\Constraint\\Parameters\\ItemLink", "Symfony\\Component\\Validator\\Constraints\\NotBlank" given'); + $this->expectExceptionMessage('Expected argument of type "Netgen\Layouts\Validator\Constraint\Parameters\ItemLink", "Symfony\Component\Validator\Constraints\NotBlank" given'); $this->constraint = new NotBlank(); $this->assertValid(true, 'value://42'); diff --git a/tests/lib/Validator/Parameters/LinkValidatorTest.php b/tests/lib/Validator/Parameters/LinkValidatorTest.php index 852b4c7f5..66505994c 100644 --- a/tests/lib/Validator/Parameters/LinkValidatorTest.php +++ b/tests/lib/Validator/Parameters/LinkValidatorTest.php @@ -42,7 +42,7 @@ public function testValidate(?LinkValue $value, bool $required, array $valueType public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessage('Expected argument of type "Netgen\\Layouts\\Validator\\Constraint\\Parameters\\Link", "Symfony\\Component\\Validator\\Constraints\\NotBlank" given'); + $this->expectExceptionMessage('Expected argument of type "Netgen\Layouts\Validator\Constraint\Parameters\Link", "Symfony\Component\Validator\Constraints\NotBlank" given'); $this->constraint = new NotBlank(); $this->assertValid(true, new LinkValue()); @@ -54,7 +54,7 @@ public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint() public function testValidateThrowsUnexpectedTypeExceptionWithInvalidValue(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessageMatches('/^Expected argument of type "Netgen\\\\Layouts\\\\Parameters\\\\Value\\\\LinkValue", "int(eger)?" given$/'); + $this->expectExceptionMessageMatches('/^Expected argument of type "Netgen\\\Layouts\\\Parameters\\\Value\\\LinkValue", "int(eger)?" given$/'); $this->assertValid(true, 42); } diff --git a/tests/lib/Validator/Structs/BlockCreateStructValidatorTest.php b/tests/lib/Validator/Structs/BlockCreateStructValidatorTest.php index 6d9e97a90..4b0cb9bc0 100644 --- a/tests/lib/Validator/Structs/BlockCreateStructValidatorTest.php +++ b/tests/lib/Validator/Structs/BlockCreateStructValidatorTest.php @@ -50,7 +50,7 @@ public function testValidate(array $value, bool $isValid): void public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessage('Expected argument of type "Netgen\\Layouts\\Validator\\Constraint\\Structs\\BlockCreateStruct", "Symfony\\Component\\Validator\\Constraints\\NotBlank" given'); + $this->expectExceptionMessage('Expected argument of type "Netgen\Layouts\Validator\Constraint\Structs\BlockCreateStruct", "Symfony\Component\Validator\Constraints\NotBlank" given'); $this->constraint = new NotBlank(); $this->assertValid(true, new BlockCreateStruct(new BlockDefinition())); @@ -62,7 +62,7 @@ public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint() public function testValidateThrowsUnexpectedTypeExceptionWithInvalidValue(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessageMatches('/^Expected argument of type "Netgen\\\\Layouts\\\\API\\\\Values\\\\Block\\\\BlockCreateStruct", "int(eger)?" given$/'); + $this->expectExceptionMessageMatches('/^Expected argument of type "Netgen\\\Layouts\\\API\\\Values\\\Block\\\BlockCreateStruct", "int(eger)?" given$/'); $this->assertValid(true, 42); } diff --git a/tests/lib/Validator/Structs/BlockUpdateStructValidatorTest.php b/tests/lib/Validator/Structs/BlockUpdateStructValidatorTest.php index bbd9f3634..ce734234b 100644 --- a/tests/lib/Validator/Structs/BlockUpdateStructValidatorTest.php +++ b/tests/lib/Validator/Structs/BlockUpdateStructValidatorTest.php @@ -62,7 +62,7 @@ public function testValidate(array $value, bool $isValid): void public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessage('Expected argument of type "Netgen\\Layouts\\Validator\\Constraint\\Structs\\BlockUpdateStruct", "Symfony\\Component\\Validator\\Constraints\\NotBlank" given'); + $this->expectExceptionMessage('Expected argument of type "Netgen\Layouts\Validator\Constraint\Structs\BlockUpdateStruct", "Symfony\Component\Validator\Constraints\NotBlank" given'); $this->constraint = new NotBlank(); $this->assertValid(true, new BlockUpdateStruct()); @@ -74,7 +74,7 @@ public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint() public function testValidateThrowsUnexpectedTypeExceptionWithInvalidBlock(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessage('Expected argument of type "Netgen\\Layouts\\API\\Values\\Block\\Block", "stdClass" given'); + $this->expectExceptionMessage('Expected argument of type "Netgen\Layouts\API\Values\Block\Block", "stdClass" given'); $this->constraint->payload = new stdClass(); $this->assertValid(true, new BlockUpdateStruct()); @@ -86,7 +86,7 @@ public function testValidateThrowsUnexpectedTypeExceptionWithInvalidBlock(): voi public function testValidateThrowsUnexpectedTypeExceptionWithInvalidValue(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessageMatches('/^Expected argument of type "Netgen\\\\Layouts\\\\API\\\\Values\\\\Block\\\\BlockUpdateStruct", "int(eger)?" given$/'); + $this->expectExceptionMessageMatches('/^Expected argument of type "Netgen\\\Layouts\\\API\\\Values\\\Block\\\BlockUpdateStruct", "int(eger)?" given$/'); $this->constraint->payload = new Block(); $this->assertValid(true, 42); diff --git a/tests/lib/Validator/Structs/ConfigAwareStructValidatorTest.php b/tests/lib/Validator/Structs/ConfigAwareStructValidatorTest.php index 7827eb80a..01cb49212 100644 --- a/tests/lib/Validator/Structs/ConfigAwareStructValidatorTest.php +++ b/tests/lib/Validator/Structs/ConfigAwareStructValidatorTest.php @@ -63,7 +63,7 @@ public function testValidate(array $value, bool $isValid): void public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessage('Expected argument of type "Netgen\\Layouts\\Validator\\Constraint\\Structs\\ConfigAwareStruct", "Symfony\\Component\\Validator\\Constraints\\NotBlank" given'); + $this->expectExceptionMessage('Expected argument of type "Netgen\Layouts\Validator\Constraint\Structs\ConfigAwareStruct", "Symfony\Component\Validator\Constraints\NotBlank" given'); $this->constraint = new NotBlank(); $this->assertValid(true, new BlockUpdateStruct()); @@ -75,7 +75,7 @@ public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint() public function testValidateThrowsUnexpectedTypeExceptionWithInvalidPayload(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessage('Expected argument of type "Netgen\\Layouts\\Config\\ConfigDefinitionAwareInterface or array", "stdClass" given'); + $this->expectExceptionMessage('Expected argument of type "Netgen\Layouts\Config\ConfigDefinitionAwareInterface or array", "stdClass" given'); $this->constraint->payload = new stdClass(); $this->assertValid(true, new BlockUpdateStruct()); @@ -87,7 +87,7 @@ public function testValidateThrowsUnexpectedTypeExceptionWithInvalidPayload(): v public function testValidateThrowsUnexpectedTypeExceptionWithInvalidValue(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessageMatches('/^Expected argument of type "Netgen\\\\Layouts\\\\API\\\\Values\\\\Config\\\\ConfigAwareStruct", "int(eger)?" given$/'); + $this->expectExceptionMessageMatches('/^Expected argument of type "Netgen\\\Layouts\\\API\\\Values\\\Config\\\ConfigAwareStruct", "int(eger)?" given$/'); $this->constraint->payload = new BlockDefinition(); $this->assertValid(true, 42); diff --git a/tests/lib/Validator/Structs/ParameterStructValidatorTest.php b/tests/lib/Validator/Structs/ParameterStructValidatorTest.php index 3c195837d..718a00ad5 100644 --- a/tests/lib/Validator/Structs/ParameterStructValidatorTest.php +++ b/tests/lib/Validator/Structs/ParameterStructValidatorTest.php @@ -156,7 +156,7 @@ public function testValidateWithRuntimeConstraints(array $value, bool $required, public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessage('Expected argument of type "Netgen\\Layouts\\Validator\\Constraint\\Structs\\ParameterStruct", "Symfony\\Component\\Validator\\Constraints\\NotBlank" given'); + $this->expectExceptionMessage('Expected argument of type "Netgen\Layouts\Validator\Constraint\Structs\ParameterStruct", "Symfony\Component\Validator\Constraints\NotBlank" given'); $this->constraint = new NotBlank(); $this->assertValid(true, new BlockCreateStruct(new BlockDefinition())); @@ -180,7 +180,7 @@ public function testValidateThrowsMissingOptionsExceptionWithInvalidParameterDef public function testValidateThrowsUnexpectedTypeExceptionWithInvalidValue(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessageMatches('/^Expected argument of type "Netgen\\\\Layouts\\\\API\\\\Values\\\\ParameterStruct", "int(eger)?" given$/'); + $this->expectExceptionMessageMatches('/^Expected argument of type "Netgen\\\Layouts\\\API\\\Values\\\ParameterStruct", "int(eger)?" given$/'); $this->assertValid(true, 42); } diff --git a/tests/lib/Validator/Structs/QueryUpdateStructValidatorTest.php b/tests/lib/Validator/Structs/QueryUpdateStructValidatorTest.php index cd4b06305..2bfa1c5b8 100644 --- a/tests/lib/Validator/Structs/QueryUpdateStructValidatorTest.php +++ b/tests/lib/Validator/Structs/QueryUpdateStructValidatorTest.php @@ -52,7 +52,7 @@ public function testValidate(array $value, bool $isValid): void public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessage('Expected argument of type "Netgen\\Layouts\\Validator\\Constraint\\Structs\\QueryUpdateStruct", "Symfony\\Component\\Validator\\Constraints\\NotBlank" given'); + $this->expectExceptionMessage('Expected argument of type "Netgen\Layouts\Validator\Constraint\Structs\QueryUpdateStruct", "Symfony\Component\Validator\Constraints\NotBlank" given'); $this->constraint = new NotBlank(); $this->assertValid(true, new QueryUpdateStruct()); @@ -64,7 +64,7 @@ public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint() public function testValidateThrowsUnexpectedTypeExceptionWithInvalidBlock(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessage('Expected argument of type "Netgen\\Layouts\\API\\Values\\Collection\\Query", "stdClass" given'); + $this->expectExceptionMessage('Expected argument of type "Netgen\Layouts\API\Values\Collection\Query", "stdClass" given'); $this->constraint->payload = new stdClass(); $this->assertValid(true, new QueryUpdateStruct()); @@ -76,7 +76,7 @@ public function testValidateThrowsUnexpectedTypeExceptionWithInvalidBlock(): voi public function testValidateThrowsUnexpectedTypeExceptionWithInvalidValue(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessageMatches('/^Expected argument of type "Netgen\\\\Layouts\\\\API\\\\Values\\\\Collection\\\\QueryUpdateStruct", "int(eger)?" given$/'); + $this->expectExceptionMessageMatches('/^Expected argument of type "Netgen\\\Layouts\\\API\\\Values\\\Collection\\\QueryUpdateStruct", "int(eger)?" given$/'); $this->constraint->payload = new Query(); $this->assertValid(true, 42); diff --git a/tests/lib/Validator/ValueTypeValidatorTest.php b/tests/lib/Validator/ValueTypeValidatorTest.php index 01c4d348c..6743603a3 100644 --- a/tests/lib/Validator/ValueTypeValidatorTest.php +++ b/tests/lib/Validator/ValueTypeValidatorTest.php @@ -39,7 +39,7 @@ public function testValidate(string $value, bool $isValid): void public function testValidateThrowsUnexpectedTypeExceptionWithInvalidConstraint(): void { $this->expectException(UnexpectedTypeException::class); - $this->expectExceptionMessage('Expected argument of type "Netgen\\Layouts\\Validator\\Constraint\\ValueType", "Symfony\\Component\\Validator\\Constraints\\NotBlank" given'); + $this->expectExceptionMessage('Expected argument of type "Netgen\Layouts\Validator\Constraint\ValueType", "Symfony\Component\Validator\Constraints\NotBlank" given'); $this->constraint = new NotBlank(); $this->assertValid(true, 'value'); diff --git a/tests/lib/View/Provider/PlaceholderViewProviderTest.php b/tests/lib/View/Provider/PlaceholderViewProviderTest.php index 1cf311df3..e4e52dfd6 100644 --- a/tests/lib/View/Provider/PlaceholderViewProviderTest.php +++ b/tests/lib/View/Provider/PlaceholderViewProviderTest.php @@ -67,7 +67,7 @@ public function testProvideViewThrowsRuntimeExceptionOnMissingBlock(): void public function testProvideViewThrowsRuntimeExceptionOnInvalidBlock(): void { $this->expectException(ViewProviderException::class); - $this->expectExceptionMessage('To build the placeholder view, "block" parameter needs to be of "Netgen\\Layouts\\API\\Values\\Block\\Block" type.'); + $this->expectExceptionMessage('To build the placeholder view, "block" parameter needs to be of "Netgen\Layouts\API\Values\Block\Block" type.'); $this->placeholderViewProvider->provideView(new Placeholder(), ['block' => 42]); } diff --git a/tests/lib/View/Provider/ZoneViewProviderTest.php b/tests/lib/View/Provider/ZoneViewProviderTest.php index 237b2ad4d..2402d0481 100644 --- a/tests/lib/View/Provider/ZoneViewProviderTest.php +++ b/tests/lib/View/Provider/ZoneViewProviderTest.php @@ -76,7 +76,7 @@ public function testProvideViewThrowsViewProviderExceptionOnMissingBlocks(): voi public function testProvideViewThrowsViewProviderExceptionOnInvalidBlocks(): void { $this->expectException(ViewProviderException::class); - $this->expectExceptionMessage('To build the zone view, "blocks" parameter needs to be of "Netgen\\Layouts\\API\\Values\\Block\\BlockList" type.'); + $this->expectExceptionMessage('To build the zone view, "blocks" parameter needs to be of "Netgen\Layouts\API\Values\Block\BlockList" type.'); $this->ZoneViewProvider->provideView(new ZoneReference(new Layout(), 'zone'), ['blocks' => 42]); } diff --git a/tests/lib/View/ViewBuilderTest.php b/tests/lib/View/ViewBuilderTest.php index 8406efaa8..b9e7a2bc8 100644 --- a/tests/lib/View/ViewBuilderTest.php +++ b/tests/lib/View/ViewBuilderTest.php @@ -92,7 +92,7 @@ public function testBuildView(): void public function testBuildViewWithNoViewProviders(): void { $this->expectException(ViewProviderException::class); - $this->expectExceptionMessage('No view providers found for "Netgen\\Layouts\\Tests\\API\\Stubs\\Value" value.'); + $this->expectExceptionMessage('No view providers found for "Netgen\Layouts\Tests\API\Stubs\Value" value.'); $value = new Value(); @@ -116,7 +116,7 @@ public function testBuildViewWithNoViewProviders(): void public function testBuildViewWithNoViewProvidersThatSupportValue(): void { $this->expectException(ViewProviderException::class); - $this->expectExceptionMessage('No view providers found for "Netgen\\Layouts\\Tests\\API\\Stubs\\Value" value.'); + $this->expectExceptionMessage('No view providers found for "Netgen\Layouts\Tests\API\Stubs\Value" value.'); $value = new Value(); diff --git a/tests/lib/View/ViewTest.php b/tests/lib/View/ViewTest.php index 9c3e05bf2..c1c1d95fc 100644 --- a/tests/lib/View/ViewTest.php +++ b/tests/lib/View/ViewTest.php @@ -135,7 +135,7 @@ public function testGetParameterWithBuiltInParameter(): void public function testGetParameterThrowsViewException(): void { $this->expectException(ViewException::class); - $this->expectExceptionMessage('Parameter with "other_param" name was not found in "Netgen\\Layouts\\Tests\\View\\Stubs\\View" view.'); + $this->expectExceptionMessage('Parameter with "other_param" name was not found in "Netgen\Layouts\Tests\View\Stubs\View" view.'); $this->view->addParameter('param', 'value');