File tree Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 4747 'title ' => env ('APP_NAME ' , 'Name of Your Application ' ),
4848 'termsOfService ' => '' ,
4949 'contact ' => [
50- 'email ' => null
50+ 'email ' => null ,
5151 ],
5252 'license ' => [
5353 'name ' => '' ,
208208 | The waiting time between attempts to write to the temporary documentation file while the file is locked
209209 */
210210 'wait_time ' => 500 ,
211- ]
211+ ],
212212 ],
213213
214214 'config_version ' => '2.9 ' ,
Original file line number Diff line number Diff line change 22
33namespace RonasIT \AutoDoc \Tests ;
44
5- use Illuminate \Support \Facades \ParallelTesting ;
65use RonasIT \AutoDoc \Drivers \LocalDriver ;
76use Illuminate \Contracts \Filesystem \FileNotFoundException ;
87use RonasIT \AutoDoc \Exceptions \MissedProductionFilePathException ;
@@ -38,11 +37,9 @@ public function testSaveProcessTmpData()
3837
3938 public function testSaveProcessTmpDataCheckTokenBasedPath ()
4039 {
41- $ token = ' workerID ' ;
40+ $ this -> mockParallelTestingToken () ;
4241
43- ParallelTesting::resolveTokenUsing (fn () => $ token );
44-
45- $ processTempFilePath = __DIR__ . "/../storage/temp_documentation_ {$ token }.json " ;
42+ $ processTempFilePath = __DIR__ . '/../storage/temp_documentation_workerID.json ' ;
4643
4744 app (LocalDriver::class)->saveProcessTmpData (self ::$ tmpData );
4845
Original file line number Diff line number Diff line change 33namespace RonasIT \AutoDoc \Tests ;
44
55use Illuminate \Http \Testing \File ;
6- use Illuminate \Support \Facades \ParallelTesting ;
76use PHPUnit \Framework \Attributes \DataProvider ;
87use RonasIT \AutoDoc \Exceptions \EmptyContactEmailException ;
98use RonasIT \AutoDoc \Exceptions \InvalidDriverClassException ;
@@ -923,9 +922,7 @@ public function testAddDataDescriptionForRouteConditionals()
923922
924923 public function testMergeTempDocumentation ()
925924 {
926- $ token = 'workerID ' ;
927-
928- ParallelTesting::resolveTokenUsing (fn () => $ token );
925+ $ this ->mockParallelTestingToken ();
929926
930927 $ tempFilePath = __DIR__ . '/../storage/temp_documentation.json ' ;
931928
Original file line number Diff line number Diff line change 55use Illuminate \Filesystem \Filesystem ;
66use Illuminate \Http \Request ;
77use Illuminate \Support \Arr ;
8+ use Illuminate \Support \Facades \ParallelTesting ;
89use Illuminate \Support \Facades \Route ;
910use Illuminate \Testing \TestResponse ;
1011use Orchestra \Testbench \TestCase as BaseTest ;
@@ -198,4 +199,9 @@ protected function addGlobalPrefix($prefix = '/global')
198199
199200 $ this ->setUp ();
200201 }
202+
203+ protected function mockParallelTestingToken (string $ token = 'workerID ' ): void
204+ {
205+ ParallelTesting::resolveTokenUsing (fn () => $ token );
206+ }
201207}
You can’t perform that action at this time.
0 commit comments