Skip to content

Commit f951657

Browse files
authored
test: fix MongoDB tests for RPC (#4062)
1 parent 93e45fc commit f951657

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/Fixtures/TestBundle/DataTransformer/RPCOutputDataTransformer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
namespace ApiPlatform\Core\Tests\Fixtures\TestBundle\DataTransformer;
1515

1616
use ApiPlatform\Core\DataTransformer\DataTransformerInterface;
17+
use ApiPlatform\Core\Tests\Fixtures\TestBundle\Document\RPC as RPCDocument;
1718
use ApiPlatform\Core\Tests\Fixtures\TestBundle\Dto\RPCOutput;
1819
use ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\RPC;
1920

@@ -32,6 +33,6 @@ public function transform($object, string $to, array $context = [])
3233
*/
3334
public function supportsTransformation($object, string $to, array $context = []): bool
3435
{
35-
return $object instanceof RPC && RPCOutput::class === $to;
36+
return ($object instanceof RPC || $object instanceof RPCDocument) && RPCOutput::class === $to;
3637
}
3738
}

0 commit comments

Comments
 (0)