File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -79,10 +79,11 @@ protected function absolutizePath(string $path): string
7979 */
8080 public function openFile (string $ filename ): void
8181 {
82- if (!file_exists ($ this ->absolutizePath ($ filename ))) {
82+ $ absolutePath = $ this ->absolutizePath ($ filename );
83+ if (!file_exists ($ absolutePath )) {
8384 TestCase::fail ('file not found ' );
8485 }
85- $ this ->file = file_get_contents ($ this -> absolutizePath ( $ filename ) );
86+ $ this ->file = file_get_contents ($ absolutePath );
8687 $ this ->filePath = $ filename ;
8788 }
8889
@@ -96,11 +97,12 @@ public function openFile(string $filename): void
9697 */
9798 public function deleteFile (string $ filename ): void
9899 {
99- if (!file_exists ($ this ->absolutizePath ($ filename ))) {
100+ $ absolutePath = $ this ->absolutizePath ($ filename );
101+ if (!file_exists ($ absolutePath )) {
100102 TestCase::fail ('file not found ' );
101103 }
102104
103- unlink ($ this -> absolutizePath ( $ filename ) );
105+ unlink ($ absolutePath );
104106 }
105107
106108 /**
You can’t perform that action at this time.
0 commit comments