Skip to content

Commit d781ef5

Browse files
committed
fix tests readableLink and graphql
1 parent d5dc43f commit d781ef5

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

tests/Fixtures/TestBundle/Entity/Address.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
use Symfony\Component\Serializer\Annotation\Groups;
1919

2020
/**
21-
* @ApiResource(
22-
* attributes={"normalization_context"={"groups"={"address_read"}}}
23-
* )
21+
* @ApiResource
2422
* @ORM\Entity
2523
*/
2624
class Address
@@ -31,13 +29,13 @@ class Address
3129
* @ORM\Id
3230
* @ORM\Column(type="integer")
3331
* @ORM\GeneratedValue(strategy="AUTO")
34-
* @Groups({"address_read"})
32+
* @Groups({"order_read"})
3533
*/
3634
private $id;
3735

3836
/**
3937
* @ORM\Column(type="string")
40-
* @Groups({"address_read"})
38+
* @Groups({"order_read"})
4139
*/
4240
public $name;
4341

tests/Fixtures/TestBundle/Entity/Customer.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
use Symfony\Component\Serializer\Annotation\Groups;
2020

2121
/**
22-
* @ApiResource(
23-
* attributes={"normalization_context"={"groups"={"customer_read"}}}
24-
* )
22+
* @ApiResource
2523
* @ORM\Entity
2624
*/
2725
class Customer
@@ -32,20 +30,20 @@ class Customer
3230
* @ORM\Id
3331
* @ORM\Column(type="integer")
3432
* @ORM\GeneratedValue(strategy="AUTO")
35-
* @Groups({"customer_read"})
33+
* @Groups({"order_read"})
3634
*/
3735
private $id;
3836

3937
/**
4038
* @ORM\Column(type="string")
41-
* @Groups({"customer_read"})
39+
* @Groups({"order_read"})
4240
*/
4341
public $name;
4442

4543
/**
4644
* @ORM\ManyToMany(targetEntity="Address")
4745
* @ORM\JoinColumn(nullable=false)
48-
* @Groups({"customer_read"})
46+
* @Groups({"order_read"})
4947
*/
5048
public $addresses;
5149

tests/Fixtures/TestBundle/Entity/Order.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/**
2222
* @ApiResource(
23-
* attributes={"normalization_context"={"groups"={"order_read", "customer_read", "address_read"}}},
23+
* attributes={"normalization_context"={"groups"={"order_read"}}},
2424
* forceEager=false
2525
* )
2626
* @ORM\Entity

tests/Fixtures/TestBundle/GraphQl/Resolver/DummyCustomQueryNotRetrievedItemResolver.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public function __invoke($item, array $context)
3333
{
3434
if (null === $item) {
3535
$item = new DummyCustomQuery();
36+
$item->id = 0;
3637
$item->message = 'Success (not retrieved)!';
3738

3839
return $item;

0 commit comments

Comments
 (0)