File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
test/Gitlab/Tests/HttpClient/Plugin Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ public function testPrefixRequestPath()
3636 $ request = new Request ('GET ' , 'projects ' );
3737 $ expected = new Request ('GET ' , '/api/v4/projects ' );
3838 $ plugin = new ApiVersion ();
39+ $ promise = new HttpFulfilledPromise (new Response ());
3940
4041 $ callback = $ this ->getMockBuilder (\stdClass::class)
4142 ->setMethods (['next ' ])
@@ -44,6 +45,7 @@ public function testPrefixRequestPath()
4445 $ callback ->expects ($ this ->once ())
4546 ->method ('next ' )
4647 ->with ($ expected )
48+ ->willReturn ($ promise )
4749 ;
4850
4951 $ plugin ->handleRequest ($ request , [$ callback , 'next ' ], function () {
@@ -54,6 +56,7 @@ public function testNoPrefixingRequired()
5456 {
5557 $ request = new Request ('GET ' , '/api/v4/projects ' );
5658 $ plugin = new ApiVersion ();
59+ $ promise = new HttpFulfilledPromise (new Response ());
5760
5861 $ callback = $ this ->getMockBuilder (\stdClass::class)
5962 ->setMethods (['next ' ])
@@ -62,6 +65,7 @@ public function testNoPrefixingRequired()
6265 $ callback ->expects ($ this ->once ())
6366 ->method ('next ' )
6467 ->with ($ request )
68+ ->willReturn ($ promise )
6569 ;
6670
6771 $ plugin ->handleRequest ($ request , [$ callback , 'next ' ], function () {
You can’t perform that action at this time.
0 commit comments