@@ -54,7 +54,7 @@ public function testProvide(): void
5454 new ApiResource (operations: [$ parentOperation ]),
5555 ])
5656 );
57- $ decorated ->provide ($ parentOperation , $ uriVariables )->shouldBeCalled ()->willReturn (new Company ());
57+ $ decorated ->provide ($ parentOperation , $ uriVariables, [] )->shouldBeCalled ()->willReturn (new Company ());
5858
5959 $ createProvider = new CreateProvider ($ decorated ->reveal (), $ resourceMetadataCollectionFactory ->reveal ());
6060 $ createProvider ->provide ($ operation , $ uriVariables );
@@ -78,7 +78,7 @@ public function testProvideParentNotFound(): void
7878 new ApiResource (operations: [$ parentOperation ]),
7979 ])
8080 );
81- $ decorated ->provide ($ parentOperation , $ uriVariables )->shouldBeCalled ()->willReturn (null );
81+ $ decorated ->provide ($ parentOperation , $ uriVariables, [] )->shouldBeCalled ()->willReturn (null );
8282
8383 $ this ->expectException (NotFoundHttpException::class);
8484
@@ -104,7 +104,7 @@ public function testProvideParentProviderNotFound(): void
104104 new ApiResource (operations: [$ parentOperation ]),
105105 ])
106106 );
107- $ decorated ->provide ($ parentOperation , $ uriVariables )->shouldBeCalled ()->willThrow (ProviderNotFoundException::class);
107+ $ decorated ->provide ($ parentOperation , $ uriVariables, [] )->shouldBeCalled ()->willThrow (ProviderNotFoundException::class);
108108
109109 $ this ->expectException (NotFoundHttpException::class);
110110
@@ -127,7 +127,7 @@ class: Employee::class,
127127 $ parentOperation = new Get (uriVariables: ['id ' => $ link ], class: Company::class);
128128
129129 $ resourceMetadataCollectionFactory ->create (Company::class)->shouldBeCalledOnce ()->willThrow (ResourceClassNotFoundException::class);
130- $ decorated ->provide ($ parentOperation , $ uriVariables )->shouldNotBeCalled ();
130+ $ decorated ->provide ($ parentOperation , $ uriVariables, [] )->shouldNotBeCalled ();
131131
132132 $ this ->expectException (ResourceClassNotFoundException::class);
133133
@@ -157,7 +157,7 @@ class: Employee::class,
157157 new ApiResource (),
158158 ])
159159 );
160- $ decorated ->provide ($ parentOperation , $ uriVariables )->shouldNotBeCalled ();
160+ $ decorated ->provide ($ parentOperation , $ uriVariables, [] )->shouldNotBeCalled ();
161161
162162 $ this ->expectException (OperationNotFoundException::class);
163163
@@ -191,7 +191,7 @@ class: Employee::class,
191191 ]),
192192 ])
193193 );
194- $ decorated ->provide ($ parentOperation , $ uriVariables )->shouldBeCalled ()->willReturn (new Company ());
194+ $ decorated ->provide ($ parentOperation , $ uriVariables, [] )->shouldBeCalled ()->willReturn (new Company ());
195195
196196 $ createProvider = new CreateProvider ($ decorated ->reveal (), $ resourceMetadataCollectionFactory ->reveal ());
197197 $ createProvider ->provide ($ operation , $ uriVariables );
@@ -215,7 +215,7 @@ public function testProvideFailsProperlyOnComplexConstructor(): void
215215 new ApiResource (operations: [$ parentOperation ]),
216216 ])
217217 );
218- $ decorated ->provide ($ parentOperation , $ uriVariables )->shouldBeCalled ()->willReturn (new Company ());
218+ $ decorated ->provide ($ parentOperation , $ uriVariables, [] )->shouldBeCalled ()->willReturn (new Company ());
219219
220220 $ this ->expectException (RuntimeException::class);
221221 $ this ->expectExceptionMessage ('An error occurred while trying to create an instance of the "ApiPlatform\Tests\Fixtures\TestBundle\Entity\DummyResourceWithComplexConstructor" resource. Consider writing your own "ApiPlatform\State\ProviderInterface" implementation and setting it as `provider` on your operation instead. ' );
0 commit comments