Skip to content

Commit c65015e

Browse files
committed
test: various fixes (#7063)
1 parent 5571245 commit c65015e

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

tests/Fixtures/TestBundle/Document/SecuredDummyCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#[ODM\Document]
3737
class SecuredDummyCollection
3838
{
39-
#[ODM\Id(strategy: 'AUTO', type: 'integer')]
39+
#[ODM\Id(strategy: 'INCREMENT', type: 'int')]
4040
public ?int $id = null;
4141

4242
/**

tests/Fixtures/TestBundle/Document/SecuredDummyCollectionParent.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,9 @@
3535
#[ODM\Document]
3636
class SecuredDummyCollectionParent
3737
{
38-
#[ODM\Id]
39-
#[ODM\Field(type: 'id')]
40-
public ?string $id = null;
38+
#[ODM\Id(strategy: 'INCREMENT', type: 'int')]
39+
public ?int $id = null;
4140

42-
#[ODM\ReferenceOne(targetDocument: SecuredDummyCollection::class, inversedBy: 'parents')]
43-
#[ODM\Field(nullable: false)]
44-
public SecuredDummyCollection $child;
41+
#[ODM\ReferenceOne(targetDocument: SecuredDummyCollection::class)]
42+
public ?SecuredDummyCollection $child = null;
4543
}

tests/Functional/GraphQl/SecurityTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
use ApiPlatform\Symfony\Bundle\Test\ApiTestCase;
1717
use ApiPlatform\Tests\Fixtures\TestBundle\Document\SecuredDummy as DocumentSecuredDummy;
18-
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\SecuredDummy;
1918
use ApiPlatform\Tests\Fixtures\TestBundle\Document\SecuredDummyCollection as DocumentSecuredDummyCollection;
19+
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\SecuredDummy;
2020
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\SecuredDummyCollection;
2121
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\SecuredDummyCollectionParent;
2222
use ApiPlatform\Tests\RecreateSchemaTrait;

0 commit comments

Comments
 (0)