@@ -843,34 +843,28 @@ public function testMergeTempDocumentation()
843843 {
844844 $ this ->mockParallelTestingToken ();
845845
846- $ tempFilePath = __DIR__ . '/../storage/temp_documentation.json ' ;
847-
848- file_put_contents ($ tempFilePath , json_encode ($ this ->getJsonFixture ('tmp_data_post_user_request ' )));
846+ $ this ->fillTempFile ($ this ->getFixture ('tmp_data_post_user_request.json ' ));
849847
850848 $ this ->mockDriverGetTmpData ($ this ->getJsonFixture ('tmp_data_search_users_empty_request ' ));
851849
852850 $ service = app (SwaggerService::class);
853851
854852 $ service ->saveProductionData ();
855853
856- $ this ->assertFileExists ($ tempFilePath );
857- $ this ->assertFileEquals ($ this ->generateFixturePath ('tmp_data_merged.json ' ), $ tempFilePath );
854+ $ this ->assertTempFileEqualsFixture ('tmp_data_merged ' );
858855 }
859856
860857 public function testMergeToEmptyTempDocumentation ()
861858 {
862859 $ this ->mockParallelTestingToken ();
863860
864- $ tempFilePath = __DIR__ . '/../storage/temp_documentation.json ' ;
865-
866- file_put_contents ($ tempFilePath , '' );
861+ $ this ->fillTempFile ('' );
867862
868863 $ this ->mockDriverGetTmpData ($ this ->getJsonFixture ('tmp_data_search_users_empty_request ' ));
869864
870865 app (SwaggerService::class)->saveProductionData ();
871866
872- $ this ->assertFileExists ($ tempFilePath );
873- $ this ->assertFileEquals ($ this ->generateFixturePath ('tmp_data_merged_to_empty_temp_documentation.json ' ), $ tempFilePath );
867+ $ this ->assertTempFileEqualsFixture ('tmp_data_merged_to_empty_temp_documentation ' );
874868 }
875869
876870 public function testAddDataWhenInvokableClass ()
0 commit comments