File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,11 @@ public function withFormRequestParameter(TestRequest $request)
5757 return '' ;
5858 }
5959
60+ public function withMultipleFormRequestParameters (string $ test , TestRequest $ request )
61+ {
62+ return '' ;
63+ }
64+
6065 /**
6166 * @bodyParam direct_one string Is found directly on the method.
6267 */
Original file line number Diff line number Diff line change @@ -139,6 +139,48 @@ public function can_parse_form_request_body_parameters()
139139 ], $ bodyParameters );
140140 }
141141
142+ /** @test */
143+ public function can_parse_multiple_form_request_body_parameters ()
144+ {
145+ $ route = $ this ->createRoute ('GET ' , '/api/test ' , 'withMultipleFormRequestParameters ' );
146+ $ bodyParameters = $ this ->generator ->processRoute ($ route )['bodyParameters ' ];
147+
148+ $ this ->assertArraySubset ([
149+ 'user_id ' => [
150+ 'type ' => 'integer ' ,
151+ 'required ' => true ,
152+ 'description ' => 'The id of the user. ' ,
153+ 'value ' => 9 ,
154+ ],
155+ 'room_id ' => [
156+ 'type ' => 'string ' ,
157+ 'required ' => false ,
158+ 'description ' => 'The id of the room. ' ,
159+ ],
160+ 'forever ' => [
161+ 'type ' => 'boolean ' ,
162+ 'required ' => false ,
163+ 'description ' => 'Whether to ban the user forever. ' ,
164+ 'value ' => false ,
165+ ],
166+ 'another_one ' => [
167+ 'type ' => 'number ' ,
168+ 'required ' => false ,
169+ 'description ' => 'Just need something here. ' ,
170+ ],
171+ 'yet_another_param ' => [
172+ 'type ' => 'object ' ,
173+ 'required ' => true ,
174+ 'description ' => '' ,
175+ ],
176+ 'even_more_param ' => [
177+ 'type ' => 'array ' ,
178+ 'required ' => false ,
179+ 'description ' => '' ,
180+ ],
181+ ], $ bodyParameters );
182+ }
183+
142184 /** @test */
143185 public function can_parse_query_parameters ()
144186 {
You can’t perform that action at this time.
0 commit comments