diff --git a/src/Bridge/Symfony/Bundle/Test/ApiTestAssertionsTrait.php b/src/Bridge/Symfony/Bundle/Test/ApiTestAssertionsTrait.php index a3f828a0340..bd246318424 100644 --- a/src/Bridge/Symfony/Bundle/Test/ApiTestAssertionsTrait.php +++ b/src/Bridge/Symfony/Bundle/Test/ApiTestAssertionsTrait.php @@ -20,7 +20,6 @@ use ApiPlatform\Core\JsonSchema\SchemaFactoryInterface; use PHPUnit\Framework\ExpectationFailedException; use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; use Symfony\Contracts\HttpClient\ResponseInterface; /** @@ -112,14 +111,14 @@ public static function assertMatchesJsonSchema($jsonSchema, ?int $checkMode = nu public static function assertMatchesResourceCollectionJsonSchema(string $resourceClass, ?string $operationName = null, string $format = 'jsonld'): void { - $schema = self::getSchemaFactory()->buildSchema($resourceClass, $format, Schema::TYPE_OUTPUT, OperationType::COLLECTION, $operationName, null, [AbstractNormalizer::ALLOW_EXTRA_ATTRIBUTES => false]); + $schema = self::getSchemaFactory()->buildSchema($resourceClass, $format, Schema::TYPE_OUTPUT, OperationType::COLLECTION, $operationName, null); static::assertMatchesJsonSchema($schema->getArrayCopy()); } public static function assertMatchesResourceItemJsonSchema(string $resourceClass, ?string $operationName = null, string $format = 'jsonld'): void { - $schema = self::getSchemaFactory()->buildSchema($resourceClass, $format, Schema::TYPE_OUTPUT, OperationType::ITEM, $operationName, null, [AbstractNormalizer::ALLOW_EXTRA_ATTRIBUTES => false]); + $schema = self::getSchemaFactory()->buildSchema($resourceClass, $format, Schema::TYPE_OUTPUT, OperationType::ITEM, $operationName, null); static::assertMatchesJsonSchema($schema->getArrayCopy()); }