File tree Expand file tree Collapse file tree 1 file changed +5
-18
lines changed
src/Support/PHPUnit/EventSubscribers Expand file tree Collapse file tree 1 file changed +5
-18
lines changed Original file line number Diff line number Diff line change 22
33namespace RonasIT \AutoDoc \Support \PHPUnit \EventSubscribers ;
44
5- use Illuminate \Contracts \Console \Kernel ;
6- use Illuminate \Foundation \Application ;
7- use PHPUnit \Event \Application \Finished ;
8- use PHPUnit \Event \Application \FinishedSubscriber ;
9- use RonasIT \AutoDoc \Services \SwaggerService ;
5+ use PHPUnit \Event \TestRunner \ExecutionFinished ;
6+ use PHPUnit \Event \TestRunner \ExecutionFinishedSubscriber ;
107
11- final class SwaggerSaveDocumentationSubscriber implements FinishedSubscriber
8+ final class SwaggerSaveDocumentationSubscriber implements ExecutionFinishedSubscriber
129{
13- public function notify (Finished $ event ): void
10+ public function notify (ExecutionFinished $ event ): void
1411 {
15- $ this ->createApplication ();
16-
17- app (SwaggerService::class)->saveProductionData ();
18- }
19-
20- protected function createApplication (): void
21- {
22- $ app = require Application::inferBasePath () . '/bootstrap/app.php ' ;
23-
24- $ app ->loadEnvironmentFrom ('.env.testing ' );
25- $ app ->make (Kernel::class)->bootstrap ();
12+ shell_exec ('php artisan swagger:push-documentation ' );
2613 }
2714}
You can’t perform that action at this time.
0 commit comments