7
7
use Mpociot \ApiDoc \ApiDocGeneratorServiceProvider ;
8
8
use Mpociot \ApiDoc \Generators \LaravelGenerator ;
9
9
use Orchestra \Testbench \TestCase ;
10
- use Mpociot \ApiDoc \Tests \Fixtures \TestRequest ;
11
10
use Mpociot \ApiDoc \Tests \Fixtures \TestController ;
12
11
use Illuminate \Support \Facades \Route as RouteFacade ;
13
12
@@ -30,6 +29,7 @@ public function setUp()
30
29
31
30
/**
32
31
* @param \Illuminate\Foundation\Application $app
32
+ *
33
33
* @return array
34
34
*/
35
35
protected function getPackageProviders ($ app )
@@ -45,13 +45,13 @@ public function testConsoleCommandNeedsAPrefixOrRoute()
45
45
46
46
public function testConsoleCommandDoesNotWorkWithClosure ()
47
47
{
48
- RouteFacade::get ('/api/closure ' , function () {
48
+ RouteFacade::get ('/api/closure ' , function () {
49
49
return 'foo ' ;
50
50
});
51
51
RouteFacade::get ('/api/test ' , TestController::class.'@parseMethodDescription ' );
52
52
53
53
$ output = $ this ->artisan ('api:generate ' , [
54
- '--routePrefix ' => 'api/* '
54
+ '--routePrefix ' => 'api/* ' ,
55
55
]);
56
56
$ this ->assertContains ('Skipping route: api/closure - contains closure. ' , $ output );
57
57
$ this ->assertContains ('Processed route: api/test ' , $ output );
@@ -60,11 +60,13 @@ public function testConsoleCommandDoesNotWorkWithClosure()
60
60
/**
61
61
* @param string $command
62
62
* @param array $parameters
63
+ *
63
64
* @return mixed
64
65
*/
65
66
public function artisan ($ command , $ parameters = [])
66
67
{
67
68
$ this ->app [Kernel::class]->call ($ command , $ parameters );
69
+
68
70
return $ this ->app [Kernel::class]->output ();
69
71
}
70
72
}
0 commit comments