File tree Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Original file line number Diff line number Diff line change 1818 "require" : {
1919 "php" : " >=7.1.0" ,
2020 "laravel/framework" : " >=5.3.0" ,
21- "minime/annotations" : " 2.3.1 "
21+ "minime/annotations" : " ~3.0 "
2222 },
2323 "autoload" : {
2424 "psr-4" : {
Original file line number Diff line number Diff line change 77
88trait AutoDocTestCaseTrait
99{
10- protected $ docService ;
11-
12- public function setUp (): void
13- {
14- parent ::setUp ();
15-
16- $ this ->docService = app (SwaggerService::class);
17- }
10+ public $ docService ;
1811
1912 public function createApplication ()
2013 {
2114 parent ::createApplication ();
2215 }
2316
2417 public function tearDown (): void
18+ {
19+ $ this ->saveDocumentation ();
20+
21+ parent ::tearDown ();
22+ }
23+
24+ public function saveDocumentation ()
2525 {
2626 $ currentTestCount = $ this ->getTestResultObject ()->count ();
2727 $ allTestCount = $ this ->getTestResultObject ()->topTestSuite ()->count ();
2828
2929 if (($ currentTestCount == $ allTestCount ) && (!$ this ->hasFailed ())) {
30- $ this ->docService ->saveProductionData ();
30+ $ docService = $ this ->docService ?? app (SwaggerService::class);
31+ $ docService ->saveProductionData ();
3132 }
32-
33- parent ::tearDown ();
3433 }
3534
3635 /**
You can’t perform that action at this time.
0 commit comments