mirror of
https://github.com/ambieco/scribe.git
synced 2026-04-23 05:29:18 +08:00
Separate tests for Laravel and Dingo to reduce composer constraint clashes
This commit is contained in:
@@ -49,7 +49,6 @@ class GenerateDocumentationTest extends TestCase
|
||||
protected function getPackageProviders($app)
|
||||
{
|
||||
return [
|
||||
\Dingo\Api\Provider\LaravelServiceProvider::class,
|
||||
ApiDocGeneratorServiceProvider::class,
|
||||
];
|
||||
}
|
||||
@@ -69,26 +68,6 @@ class GenerateDocumentationTest extends TestCase
|
||||
$this->assertStringContainsString('Processed route: [GET] api/test', $output);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function console_command_does_not_work_with_closure_using_dingo()
|
||||
{
|
||||
$api = app(\Dingo\Api\Routing\Router::class);
|
||||
$api->version('v1', function ($api) {
|
||||
$api->get('/closure', function () {
|
||||
return 'foo';
|
||||
});
|
||||
$api->get('/test', TestController::class . '@withEndpointDescription');
|
||||
});
|
||||
|
||||
config(['apidoc.router' => 'dingo']);
|
||||
config(['apidoc.routes.0.match.prefixes' => ['*']]);
|
||||
config(['apidoc.routes.0.match.versions' => ['v1']]);
|
||||
$output = $this->artisan('apidoc:generate');
|
||||
|
||||
$this->assertStringContainsString('Skipping route: [GET] closure', $output);
|
||||
$this->assertStringContainsString('Processed route: [GET] test', $output);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function console_command_works_with_routes_callable_tuple()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user