File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
tests/Fixtures/TestBundle/Controller/Issue6355 Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ Feature: Sending PATCH requets
81
81
}
82
82
"""
83
83
84
+ @controller
84
85
Scenario : Patch a non-readable resource
85
86
When I add "Content-Type" header equal to "application/merge-patch+json"
86
87
And I send a "PATCH" request to "/order_products/1/count" with body:
@@ -89,5 +90,7 @@ Feature: Sending PATCH requets
89
90
"id": 1,
90
91
"count": 10
91
92
}
93
+
92
94
"""
93
- Then print last JSON response
95
+ Then the response status code should be 200
96
+ And the JSON node "id" should contain "1"
Original file line number Diff line number Diff line change 14
14
namespace ApiPlatform \Tests \Fixtures \TestBundle \Controller \Issue6355 ;
15
15
16
16
use ApiPlatform \Tests \Fixtures \TestBundle \ApiResource \Issue6355 \OrderDto ;
17
- use ApiPlatform \Tests \Fixtures \TestBundle \ApiResource \Issue6355 \OrderProductCount ;
18
17
use Symfony \Bundle \FrameworkBundle \Controller \AbstractController ;
19
18
use Symfony \Component \HttpFoundation \Request ;
20
19
use Symfony \Component \HttpKernel \Attribute \AsController ;
21
20
22
21
#[AsController]
23
22
class UpdateOrderProductCountController extends AbstractController
24
23
{
25
- public function __invoke (OrderProductCount $ data , Request $ request ): OrderDto
24
+ public function __invoke (OrderDto $ data , Request $ request ): OrderDto
26
25
{
27
26
$ dto = new OrderDto ();
28
27
$ dto ->id = 1 ;
You can’t perform that action at this time.
0 commit comments