Skip to content

Commit

Permalink
api: fix comparison with wrong value in PreventAutomaticEmbeddingProp…
Browse files Browse the repository at this point in the history
…ertyMetadataFactoryTest

And use values which say something about the parameter that this is less likely to happen anymore.
  • Loading branch information
BacLuc committed Dec 11, 2023
1 parent b274c84 commit 99c1a08
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface;
use App\Serializer\PreventAutomaticEmbeddingPropertyMetadataFactory;
use PHPUnit\Framework\TestCase;
use Symfony\Component\PropertyInfo\Type as PropertyInfoType;

/**
* @internal
Expand All @@ -27,20 +28,20 @@ public function testCreateResetsReadableLinkAndWritableLinkToNull() {
'deprecationReason',
true,
true,
[],
[],
[],
['jsonldContext'],
['openapiContext'],
['jsonSchemaContext'],
true,
true,
'securityPostDenormalize',
[],
[],
[],
['types'],
[new PropertyInfoType(builtinType: PropertyInfoType::BUILTIN_TYPE_INT)],
['schema'],
true,
[],
['iris'],
true,
'',
[]
'uriTemplate',
['extraProperties']
);
$decorated->expects($this->once())
->method('create')
Expand Down Expand Up @@ -68,7 +69,7 @@ public function testCreateResetsReadableLinkAndWritableLinkToNull() {
$this->assertEquals($apiProperty->isFetchable(), $result->isFetchable());
$this->assertEquals($apiProperty->getFetchEager(), $result->getFetchEager());
$this->assertEquals($apiProperty->getJsonldContext(), $result->getJsonldContext());
$this->assertEquals($apiProperty->getOpenapiContext(), $result->getJsonldContext());
$this->assertEquals($apiProperty->getOpenapiContext(), $result->getOpenapiContext());
$this->assertEquals($apiProperty->getJsonSchemaContext(), $result->getJsonSchemaContext());
$this->assertEquals($apiProperty->getPush(), $result->getPush());
$this->assertEquals($apiProperty->getSecurity(), $result->getSecurity());
Expand Down

0 comments on commit 99c1a08

Please sign in to comment.