@@ -22,7 +22,7 @@ public function setUp(): void
2222 $ this ->disk = Storage::fake ('testing ' );
2323
2424 $ this ->productionFilePath = 'documentation.json ' ;
25- $ this ->tmpDocumentationFilePath = ' temp_documentation.json ' ;
25+ $ this ->tmpDocumentationFilePath = __DIR__ . ' /../storage/ temp_documentation.json ' ;
2626
2727 $ this ->tmpData = $ this ->getJsonFixture ('tmp_data ' );
2828
@@ -36,18 +36,17 @@ public function testSaveTmpData()
3636 {
3737 $ this ->storageDriverClass ->saveTmpData ($ this ->tmpData );
3838
39- $ this ->disk ->assertExists ($ this ->tmpDocumentationFilePath );
40-
41- $ this ->assertEqualsFixture ('tmp_data_non_formatted.json ' , $ this ->disk ->get ($ this ->tmpDocumentationFilePath ));
39+ $ this ->assertFileExists ($ this ->tmpDocumentationFilePath );
40+ $ this ->assertFileEquals ($ this ->generateFixturePath ('tmp_data_non_formatted.json ' ), $ this ->tmpDocumentationFilePath );
4241 }
4342
4443 public function testGetTmpData ()
4544 {
46- $ this -> disk -> put ($ this ->tmpDocumentationFilePath , json_encode ($ this ->tmpData ));
45+ file_put_contents ($ this ->tmpDocumentationFilePath , json_encode ($ this ->tmpData ));
4746
4847 $ result = $ this ->storageDriverClass ->getTmpData ();
4948
50- $ this ->assertEqualsJsonFixture ( ' tmp_data ' , $ result );
49+ $ this ->assertEquals ( $ this -> tmpData , $ result );
5150 }
5251
5352 public function testGetTmpDataNoFile ()
@@ -75,7 +74,7 @@ public function testGetAndSaveTmpData()
7574
7675 public function testSaveData ()
7776 {
78- $ this -> disk -> put ($ this ->tmpDocumentationFilePath , json_encode ($ this ->tmpData ));
77+ file_put_contents ($ this ->tmpDocumentationFilePath , json_encode ($ this ->tmpData ));
7978
8079 $ this ->storageDriverClass ->saveData ();
8180
0 commit comments