Skip to content

Commit 1b18bce

Browse files
authored
fix: use getArrayCopy for assertMatchesJsonSchema (#3807)
1 parent 8e58a98 commit 1b18bce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Bridge/Symfony/Bundle/Test/ApiTestAssertionsTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ public static function assertMatchesResourceCollectionJsonSchema(string $resourc
113113
{
114114
$schema = self::getSchemaFactory()->buildSchema($resourceClass, $format, Schema::TYPE_OUTPUT, OperationType::COLLECTION, $operationName);
115115

116-
static::assertMatchesJsonSchema($schema);
116+
static::assertMatchesJsonSchema($schema->getArrayCopy());
117117
}
118118

119119
public static function assertMatchesResourceItemJsonSchema(string $resourceClass, ?string $operationName = null, string $format = 'jsonld'): void
120120
{
121121
$schema = self::getSchemaFactory()->buildSchema($resourceClass, $format, Schema::TYPE_OUTPUT, OperationType::ITEM, $operationName);
122122

123-
static::assertMatchesJsonSchema($schema);
123+
static::assertMatchesJsonSchema($schema->getArrayCopy());
124124
}
125125

126126
private static function getHttpClient(Client $newClient = null): ?Client

0 commit comments

Comments
 (0)