Skip to content

Commit a6cd704

Browse files
committed
php-cs-fixer + add subresource to dummyEntity
1 parent ac65ba1 commit a6cd704

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

tests/Bridge/Doctrine/Orm/SubresourceDataProviderTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,6 @@ public function testGetSubresourceOneToOneRelation()
326326

327327
$context = ['property' => 'ownedDummy', 'identifiers' => [['id', RelatedOwningDummy::class], ['ownedDummy', RelatedOwnedDummy::class]], 'collection' => false, IdentifierConverterInterface::HAS_IDENTIFIER_CONVERTER => true];
328328

329-
330-
331329
$this->assertEquals($result, $dataProvider->getSubresource(RelatedOwnedDummy::class, ['id' => ['id' => 1], 'ownedDummy' => ['id' => 1]], $context));
332330
}
333331

tests/Fixtures/TestBundle/Entity/RelatedOwnedDummy.php

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

1616
use ApiPlatform\Core\Annotation\ApiResource;
17+
use ApiPlatform\Core\Annotation\ApiSubresource;
1718
use Doctrine\ORM\Mapping as ORM;
1819

1920
/**
@@ -45,6 +46,7 @@ class RelatedOwnedDummy
4546
*
4647
* @ORM\OneToOne(targetEntity="Dummy", cascade={"persist"}, inversedBy="relatedOwnedDummy")
4748
* @ORM\JoinColumn(nullable=false)
49+
* @ApiSubresource
4850
*/
4951
public $owningDummy;
5052

tests/Fixtures/TestBundle/Entity/RelatedOwningDummy.php

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

1616
use ApiPlatform\Core\Annotation\ApiResource;
17+
use ApiPlatform\Core\Annotation\ApiSubresource;
1718
use Doctrine\ORM\Mapping as ORM;
1819

1920
/**
@@ -44,6 +45,7 @@ class RelatedOwningDummy
4445
* @var Dummy
4546
*
4647
* @ORM\OneToOne(targetEntity="Dummy", cascade={"persist"}, mappedBy="relatedOwningDummy")
48+
* @ApiSubresource
4749
*/
4850
public $ownedDummy;
4951

0 commit comments

Comments
 (0)