@@ -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 ' );
@@ -821,7 +821,7 @@ public function testRemoveSymlink()
821821
822822 $ this ->assertFalse (is_link ($ link ));
823823 $ this ->assertFalse (is_file ($ link ));
824- $ this ->assertFalse ( is_dir ( $ link) );
824+ $ this ->assertDirectoryNotExists ( $ link );
825825 }
826826
827827 public function testSymlinkIsOverwrittenIfPointsToDifferentTarget ()
@@ -1150,8 +1150,8 @@ public function testMirrorCopiesFilesAndDirectoriesRecursively()
11501150
11511151 $ this ->filesystem ->mirror ($ sourcePath , $ targetPath );
11521152
1153- $ this ->assertTrue ( is_dir ( $ targetPath) );
1154- $ this ->assertTrue ( is_dir ( $ targetPath .'directory ' ) );
1153+ $ this ->assertDirectoryExists ( $ targetPath );
1154+ $ this ->assertDirectoryExists ( $ targetPath .'directory ' );
11551155 $ this ->assertFileEquals ($ file1 , $ targetPath .'directory ' .\DIRECTORY_SEPARATOR .'file1 ' );
11561156 $ this ->assertFileEquals ($ file2 , $ targetPath .'file2 ' );
11571157
@@ -1184,7 +1184,7 @@ public function testMirrorCreatesEmptyDirectory()
11841184
11851185 $ this ->filesystem ->mirror ($ sourcePath , $ targetPath );
11861186
1187- $ this ->assertTrue ( is_dir ( $ targetPath) );
1187+ $ this ->assertDirectoryExists ( $ targetPath );
11881188
11891189 $ this ->filesystem ->remove ($ sourcePath );
11901190 }
@@ -1203,7 +1203,7 @@ public function testMirrorCopiesLinks()
12031203
12041204 $ this ->filesystem ->mirror ($ sourcePath , $ targetPath );
12051205
1206- $ this ->assertTrue ( is_dir ( $ targetPath) );
1206+ $ this ->assertDirectoryExists ( $ targetPath );
12071207 $ this ->assertFileEquals ($ sourcePath .'file1 ' , $ targetPath .'link1 ' );
12081208 $ this ->assertTrue (is_link ($ targetPath .\DIRECTORY_SEPARATOR .'link1 ' ));
12091209 }
@@ -1223,7 +1223,7 @@ public function testMirrorCopiesLinkedDirectoryContents()
12231223
12241224 $ this ->filesystem ->mirror ($ sourcePath , $ targetPath );
12251225
1226- $ this ->assertTrue ( is_dir ( $ targetPath) );
1226+ $ this ->assertDirectoryExists ( $ targetPath );
12271227 $ this ->assertFileEquals ($ sourcePath .'/nested/file1.txt ' , $ targetPath .'link1/file1.txt ' );
12281228 $ this ->assertTrue (is_link ($ targetPath .\DIRECTORY_SEPARATOR .'link1 ' ));
12291229 }
@@ -1247,7 +1247,7 @@ public function testMirrorCopiesRelativeLinkedContents()
12471247
12481248 $ this ->filesystem ->mirror ($ sourcePath , $ targetPath );
12491249
1250- $ this ->assertTrue ( is_dir ( $ targetPath) );
1250+ $ this ->assertDirectoryExists ( $ targetPath );
12511251 $ this ->assertFileEquals ($ sourcePath .'/nested/file1.txt ' , $ targetPath .'link1/file1.txt ' );
12521252 $ this ->assertTrue (is_link ($ targetPath .\DIRECTORY_SEPARATOR .'link1 ' ));
12531253 $ this ->assertEquals ('\\' === \DIRECTORY_SEPARATOR ? realpath ($ sourcePath .'\nested ' ) : 'nested ' , readlink ($ targetPath .\DIRECTORY_SEPARATOR .'link1 ' ));
@@ -1270,7 +1270,7 @@ public function testMirrorContentsWithSameNameAsSourceOrTargetWithoutDeleteOptio
12701270
12711271 chdir ($ oldPath );
12721272
1273- $ this ->assertTrue ( is_dir ( $ targetPath) );
1273+ $ this ->assertDirectoryExists ( $ targetPath );
12741274 $ this ->assertFileExists ($ targetPath .'source ' );
12751275 $ this ->assertFileExists ($ targetPath .'target ' );
12761276 }
@@ -1295,7 +1295,7 @@ public function testMirrorContentsWithSameNameAsSourceOrTargetWithDeleteOption()
12951295
12961296 chdir ($ oldPath );
12971297
1298- $ this ->assertTrue ( is_dir ( $ targetPath) );
1298+ $ this ->assertDirectoryExists ( $ targetPath );
12991299 $ this ->assertFileExists ($ targetPath .'source ' );
13001300 $ this ->assertFileNotExists ($ targetPath .'target ' );
13011301 }
0 commit comments