@@ -69,7 +69,7 @@ public function testCreate(LoopInterface $loop, FilesystemInterface $filesystem)
6969 {
7070 $ dir = $ this ->tmpDir . 'path ' ;
7171 $ this ->await ($ filesystem ->dir ($ dir )->createRecursive (), $ loop );
72- $ this ->assertTrue ( file_exists ( $ dir) );
72+ $ this ->assertFileExists ( $ dir );
7373 $ this ->assertSame ('0760 ' , substr (sprintf ('%o ' , fileperms ($ dir )), -4 ));
7474 }
7575
@@ -80,7 +80,7 @@ public function testCreateRecursive(LoopInterface $loop, FilesystemInterface $fi
8080 {
8181 $ dir = $ this ->tmpDir . 'path ' . DIRECTORY_SEPARATOR . 'to ' . DIRECTORY_SEPARATOR . 'reactphp ' . DIRECTORY_SEPARATOR . 'filesystem ' ;
8282 $ this ->await ($ filesystem ->dir ($ dir )->createRecursive (), $ loop );
83- $ this ->assertTrue ( file_exists ( $ dir) );
83+ $ this ->assertFileExists ( $ dir );
8484 }
8585
8686 /**
@@ -90,9 +90,9 @@ public function testRemove(LoopInterface $loop, FilesystemInterface $filesystem)
9090 {
9191 $ dir = $ this ->tmpDir . 'path ' ;
9292 mkdir ($ dir );
93- $ this ->assertTrue ( file_exists ( $ dir) );
93+ $ this ->assertFileExists ( $ dir );
9494 $ this ->await ($ filesystem ->dir ($ dir )->remove (), $ loop );
95- $ this ->assertFalse ( file_exists ( $ dir) );
95+ $ this ->assertFileNotExists ( $ dir );
9696 }
9797
9898 /**
@@ -104,11 +104,11 @@ public function testRemoveSubDir(LoopInterface $loop, FilesystemInterface $files
104104 $ subDir = $ this ->tmpDir . 'path ' . DIRECTORY_SEPARATOR . 'sub ' ;
105105 mkdir ($ dir );
106106 mkdir ($ subDir );
107- $ this ->assertTrue ( file_exists ( $ dir) );
108- $ this ->assertTrue ( file_exists ( $ subDir) );
107+ $ this ->assertFileExists ( $ dir );
108+ $ this ->assertFileExists ( $ subDir );
109109 $ this ->await ($ filesystem ->dir ($ subDir )->remove (), $ loop );
110- $ this ->assertTrue ( file_exists ( $ dir) );
111- $ this ->assertFalse ( file_exists ( $ subDir) );
110+ $ this ->assertFileExists ( $ dir );
111+ $ this ->assertFileNotExists ( $ subDir );
112112 }
113113
114114 /**
@@ -120,11 +120,11 @@ public function testRemoveRecursive(LoopInterface $loop, FilesystemInterface $fi
120120 $ subDir = $ this ->tmpDir . 'path ' . DIRECTORY_SEPARATOR . 'sub ' ;
121121 mkdir ($ dir );
122122 mkdir ($ subDir );
123- $ this ->assertTrue ( file_exists ( $ dir) );
124- $ this ->assertTrue ( file_exists ( $ subDir) );
123+ $ this ->assertFileExists ( $ dir );
124+ $ this ->assertFileExists ( $ subDir );
125125 $ this ->await ($ filesystem ->dir ($ dir )->removeRecursive (), $ loop );
126- $ this ->assertFalse ( file_exists ( $ subDir) );
127- $ this ->assertFalse ( file_exists ( $ dir) );
126+ $ this ->assertFileNotExists ( $ subDir );
127+ $ this ->assertFileNotExists ( $ dir );
128128 }
129129
130130 /**
@@ -138,8 +138,8 @@ public function testChmod(LoopInterface $loop, FilesystemInterface $filesystem)
138138 mkdir ($ subDir );
139139 chmod ($ dir , 0777 );
140140 chmod ($ subDir , 0777 );
141- $ this ->assertTrue ( file_exists ( $ dir) );
142- $ this ->assertTrue ( file_exists ( $ subDir) );
141+ $ this ->assertFileExists ( $ dir );
142+ $ this ->assertFileExists ( $ subDir );
143143 $ this ->assertSame ('0777 ' , substr (sprintf ('%o ' , fileperms ($ dir )), -4 ));
144144 $ this ->assertSame ('0777 ' , substr (sprintf ('%o ' , fileperms ($ subDir )), -4 ));
145145 clearstatcache ();
@@ -161,8 +161,8 @@ public function testChmodRecursive(LoopInterface $loop, FilesystemInterface $fil
161161 mkdir ($ subDir );
162162 chmod ($ dir , 0777 );
163163 chmod ($ subDir , 0777 );
164- $ this ->assertTrue ( file_exists ( $ dir) );
165- $ this ->assertTrue ( file_exists ( $ subDir) );
164+ $ this ->assertFileExists ( $ dir );
165+ $ this ->assertFileExists ( $ subDir );
166166 $ this ->assertSame ('0777 ' , substr (sprintf ('%o ' , fileperms ($ dir )), -4 ));
167167 $ this ->assertSame ('0777 ' , substr (sprintf ('%o ' , fileperms ($ subDir )), -4 ));
168168 clearstatcache ();
@@ -183,8 +183,8 @@ public function testChown(LoopInterface $loop, FilesystemInterface $filesystem)
183183 mkdir ($ dir , 0777 );
184184 mkdir ($ subDir , 0777 );
185185 clearstatcache ();
186- $ this ->assertTrue ( file_exists ( $ dir) );
187- $ this ->assertTrue ( file_exists ( $ subDir) );
186+ $ this ->assertFileExists ( $ dir );
187+ $ this ->assertFileExists ( $ subDir );
188188 clearstatcache ();
189189 $ stat = stat ($ dir );
190190 sleep (2 );
@@ -203,8 +203,8 @@ public function testChownRecursive(LoopInterface $loop, FilesystemInterface $fil
203203 $ subDir = $ this ->tmpDir . 'path ' . DIRECTORY_SEPARATOR . 'sub ' ;
204204 mkdir ($ dir , 0777 );
205205 mkdir ($ subDir , 0777 );
206- $ this ->assertTrue ( file_exists ( $ dir) );
207- $ this ->assertTrue ( file_exists ( $ subDir) );
206+ $ this ->assertFileExists ( $ dir );
207+ $ this ->assertFileExists ( $ subDir );
208208 clearstatcache ();
209209 $ stat = stat ($ dir );
210210 $ subStat = stat ($ subDir );
0 commit comments