@@ -153,7 +153,7 @@ public function testCopyCreatesTargetDirectoryIfItDoesNotExist()
153153
154154 $ this ->filesystem ->copy ($ sourceFilePath , $ targetFilePath );
155155
156- $ this ->assertTrue ( is_dir ( $ targetFileDirectory) );
156+ $ this ->assertDirectoryExists ( $ targetFileDirectory );
157157 $ this ->assertFileExists ($ targetFilePath );
158158 $ this ->assertStringEqualsFile ($ targetFilePath , 'SOURCE FILE ' );
159159 }
@@ -185,7 +185,7 @@ public function testMkdirCreatesDirectoriesRecursively()
185185
186186 $ this ->filesystem ->mkdir ($ directory );
187187
188- $ this ->assertTrue ( is_dir ( $ directory) );
188+ $ this ->assertDirectoryExists ( $ directory );
189189 }
190190
191191 public function testMkdirCreatesDirectoriesFromArray ()
@@ -197,9 +197,9 @@ public function testMkdirCreatesDirectoriesFromArray()
197197
198198 $ this ->filesystem ->mkdir ($ directories );
199199
200- $ this ->assertTrue ( is_dir ( $ basePath .'1 ' ) );
201- $ this ->assertTrue ( is_dir ( $ basePath .'2 ' ) );
202- $ this ->assertTrue ( is_dir ( $ basePath .'3 ' ) );
200+ $ this ->assertDirectoryExists ( $ basePath .'1 ' );
201+ $ this ->assertDirectoryExists ( $ basePath .'2 ' );
202+ $ this ->assertDirectoryExists ( $ basePath .'3 ' );
203203 }
204204
205205 public function testMkdirCreatesDirectoriesFromTraversableObject ()
@@ -211,9 +211,9 @@ public function testMkdirCreatesDirectoriesFromTraversableObject()
211211
212212 $ this ->filesystem ->mkdir ($ directories );
213213
214- $ this ->assertTrue ( is_dir ( $ basePath .'1 ' ) );
215- $ this ->assertTrue ( is_dir ( $ basePath .'2 ' ) );
216- $ this ->assertTrue ( is_dir ( $ basePath .'3 ' ) );
214+ $ this ->assertDirectoryExists ( $ basePath .'1 ' );
215+ $ this ->assertDirectoryExists ( $ basePath .'2 ' );
216+ $ this ->assertDirectoryExists ( $ basePath .'3 ' );
217217 }
218218
219219 public function testMkdirCreatesDirectoriesFails ()
@@ -347,7 +347,7 @@ public function testRemoveCleansInvalidLinks()
347347
348348 // create symlink to dir using trailing forward slash
349349 $ this ->filesystem ->symlink ($ basePath .'dir/ ' , $ basePath .'dir-link ' );
350- $ this ->assertTrue ( is_dir ( $ basePath .'dir-link ' ) );
350+ $ this ->assertDirectoryExists ( $ basePath .'dir-link ' );
351351
352352 // create symlink to nonexistent dir
353353 rmdir ($ basePath .'dir ' );
@@ -807,7 +807,7 @@ public function testRemoveSymlink()
807807
808808 $ this ->assertFalse (is_link ($ link ));
809809 $ this ->assertFalse (is_file ($ link ));
810- $ this ->assertFalse ( is_dir ( $ link) );
810+ $ this ->assertDirectoryNotExists ( $ link );
811811 }
812812
813813 public function testSymlinkIsOverwrittenIfPointsToDifferentTarget ()
@@ -1136,8 +1136,8 @@ public function testMirrorCopiesFilesAndDirectoriesRecursively()
11361136
11371137 $ this ->filesystem ->mirror ($ sourcePath , $ targetPath );
11381138
1139- $ this ->assertTrue ( is_dir ( $ targetPath) );
1140- $ this ->assertTrue ( is_dir ( $ targetPath .'directory ' ) );
1139+ $ this ->assertDirectoryExists ( $ targetPath );
1140+ $ this ->assertDirectoryExists ( $ targetPath .'directory ' );
11411141 $ this ->assertFileEquals ($ file1 , $ targetPath .'directory ' .\DIRECTORY_SEPARATOR .'file1 ' );
11421142 $ this ->assertFileEquals ($ file2 , $ targetPath .'file2 ' );
11431143
@@ -1170,7 +1170,7 @@ public function testMirrorCreatesEmptyDirectory()
11701170
11711171 $ this ->filesystem ->mirror ($ sourcePath , $ targetPath );
11721172
1173- $ this ->assertTrue ( is_dir ( $ targetPath) );
1173+ $ this ->assertDirectoryExists ( $ targetPath );
11741174
11751175 $ this ->filesystem ->remove ($ sourcePath );
11761176 }
@@ -1189,7 +1189,7 @@ public function testMirrorCopiesLinks()
11891189
11901190 $ this ->filesystem ->mirror ($ sourcePath , $ targetPath );
11911191
1192- $ this ->assertTrue ( is_dir ( $ targetPath) );
1192+ $ this ->assertDirectoryExists ( $ targetPath );
11931193 $ this ->assertFileEquals ($ sourcePath .'file1 ' , $ targetPath .'link1 ' );
11941194 $ this ->assertTrue (is_link ($ targetPath .\DIRECTORY_SEPARATOR .'link1 ' ));
11951195 }
@@ -1209,7 +1209,7 @@ public function testMirrorCopiesLinkedDirectoryContents()
12091209
12101210 $ this ->filesystem ->mirror ($ sourcePath , $ targetPath );
12111211
1212- $ this ->assertTrue ( is_dir ( $ targetPath) );
1212+ $ this ->assertDirectoryExists ( $ targetPath );
12131213 $ this ->assertFileEquals ($ sourcePath .'/nested/file1.txt ' , $ targetPath .'link1/file1.txt ' );
12141214 $ this ->assertTrue (is_link ($ targetPath .\DIRECTORY_SEPARATOR .'link1 ' ));
12151215 }
@@ -1233,7 +1233,7 @@ public function testMirrorCopiesRelativeLinkedContents()
12331233
12341234 $ this ->filesystem ->mirror ($ sourcePath , $ targetPath );
12351235
1236- $ this ->assertTrue ( is_dir ( $ targetPath) );
1236+ $ this ->assertDirectoryExists ( $ targetPath );
12371237 $ this ->assertFileEquals ($ sourcePath .'/nested/file1.txt ' , $ targetPath .'link1/file1.txt ' );
12381238 $ this ->assertTrue (is_link ($ targetPath .\DIRECTORY_SEPARATOR .'link1 ' ));
12391239 $ this ->assertEquals ('\\' === \DIRECTORY_SEPARATOR ? realpath ($ sourcePath .'\nested ' ) : 'nested ' , readlink ($ targetPath .\DIRECTORY_SEPARATOR .'link1 ' ));
@@ -1256,7 +1256,7 @@ public function testMirrorContentsWithSameNameAsSourceOrTargetWithoutDeleteOptio
12561256
12571257 chdir ($ oldPath );
12581258
1259- $ this ->assertTrue ( is_dir ( $ targetPath) );
1259+ $ this ->assertDirectoryExists ( $ targetPath );
12601260 $ this ->assertFileExists ($ targetPath .'source ' );
12611261 $ this ->assertFileExists ($ targetPath .'target ' );
12621262 }
@@ -1281,7 +1281,7 @@ public function testMirrorContentsWithSameNameAsSourceOrTargetWithDeleteOption()
12811281
12821282 chdir ($ oldPath );
12831283
1284- $ this ->assertTrue ( is_dir ( $ targetPath) );
1284+ $ this ->assertDirectoryExists ( $ targetPath );
12851285 $ this ->assertFileExists ($ targetPath .'source ' );
12861286 $ this ->assertFileNotExists ($ targetPath .'target ' );
12871287 }
0 commit comments