File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -876,7 +876,7 @@ public function testAddDataWhenInvokableClass()
876876 app (SwaggerService::class)->addData ($ request , $ response );
877877 }
878878
879- public function testAddDataWhenInvokableClassWithBindingContract ()
879+ public function testAddDataWhenInvokableClassWithBindingContractToObject ()
880880 {
881881 $ this ->mockDriverGetEmptyAndSaveProcessTmpData ($ this ->getJsonFixture ('tmp_data_get_user_request_invoke_bind_closure ' ));
882882
@@ -895,4 +895,24 @@ public function testAddDataWhenInvokableClassWithBindingContract()
895895
896896 app (SwaggerService::class)->addData ($ request , $ response );
897897 }
898+
899+ public function testAddDataWhenInvokableClassWithBindingContractToClassName ()
900+ {
901+ $ this ->mockDriverGetEmptyAndSaveProcessTmpData ($ this ->getJsonFixture ('tmp_data_get_user_request_invoke_bind_closure ' ));
902+
903+ $ this ->app ->bind (TestRequestContract::class, TestRequest::class);
904+
905+ $ request = $ this ->generateRequest (
906+ type: 'get ' ,
907+ uri: 'users ' ,
908+ controllerMethod: '__invoke ' ,
909+ controllerClass: InvokableTestController::class,
910+ );
911+
912+ $ response = $ this ->generateResponse ('example_success_user_response.json ' , 200 , [
913+ 'Content-type ' => 'application/json ' ,
914+ ]);
915+
916+ app (SwaggerService::class)->addData ($ request , $ response );
917+ }
898918}
You can’t perform that action at this time.
0 commit comments