File tree 2 files changed +15
-5
lines changed
2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -84,9 +84,7 @@ protected function processRoute(Route $route)
84
84
$ routeHeaders [] = $ this ->authentication ->toArray ();
85
85
}
86
86
87
- $ uri = Str::of ($ route ->uri ())
88
- ->after ('/ ' )
89
- ->replaceMatches ('/{([[:alnum:]]+)}/ ' , ':$1 ' );
87
+ $ uri = Str::of ($ route ->uri ())->replaceMatches ('/{([[:alnum:]]+)}/ ' , ':$1 ' );
90
88
91
89
// if (!$uri->toString()) {
92
90
// return [];
Original file line number Diff line number Diff line change @@ -266,8 +266,6 @@ public function test_php_doc_comment_export()
266
266
267
267
$ this ->artisan ('export:postman ' )->assertExitCode (0 );
268
268
269
- $ this ->assertTrue (true );
270
-
271
269
$ collection = collect (json_decode (Storage::get ('postman/ ' .config ('api-postman.filename ' )), true )['item ' ]);
272
270
273
271
$ targetRequest = $ collection
@@ -277,6 +275,20 @@ public function test_php_doc_comment_export()
277
275
$ this ->assertEquals ($ targetRequest ['request ' ]['description ' ], 'This is the php doc route. Which is also multi-line. and has a blank line. ' );
278
276
}
279
277
278
+ public function test_uri_is_correct ()
279
+ {
280
+ $ this ->artisan ('export:postman ' )->assertExitCode (0 );
281
+
282
+ $ collection = collect (json_decode (Storage::get ('postman/ ' .config ('api-postman.filename ' )), true )['item ' ]);
283
+
284
+ $ targetRequest = $ collection
285
+ ->where ('name ' , 'example/phpDocRoute ' )
286
+ ->first ();
287
+
288
+ $ this ->assertEquals ($ targetRequest ['name ' ], 'example/phpDocRoute ' );
289
+ $ this ->assertEquals ($ targetRequest ['request ' ]['url ' ]['raw ' ], '{{base_url}}/example/phpDocRoute ' );
290
+ }
291
+
280
292
public static function providerFormDataEnabled (): array
281
293
{
282
294
return [
You can’t perform that action at this time.
0 commit comments