@@ -153,7 +153,7 @@ public function testCopyCreatesTargetDirectoryIfItDoesNotExist()
153
153
154
154
$ this ->filesystem ->copy ($ sourceFilePath , $ targetFilePath );
155
155
156
- $ this ->assertTrue ( is_dir ( $ targetFileDirectory) );
156
+ $ this ->assertDirectoryExists ( $ targetFileDirectory );
157
157
$ this ->assertFileExists ($ targetFilePath );
158
158
$ this ->assertStringEqualsFile ($ targetFilePath , 'SOURCE FILE ' );
159
159
}
@@ -185,7 +185,7 @@ public function testMkdirCreatesDirectoriesRecursively()
185
185
186
186
$ this ->filesystem ->mkdir ($ directory );
187
187
188
- $ this ->assertTrue ( is_dir ( $ directory) );
188
+ $ this ->assertDirectoryExists ( $ directory );
189
189
}
190
190
191
191
public function testMkdirCreatesDirectoriesFromArray ()
@@ -197,9 +197,9 @@ public function testMkdirCreatesDirectoriesFromArray()
197
197
198
198
$ this ->filesystem ->mkdir ($ directories );
199
199
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 ' );
203
203
}
204
204
205
205
public function testMkdirCreatesDirectoriesFromTraversableObject ()
@@ -211,9 +211,9 @@ public function testMkdirCreatesDirectoriesFromTraversableObject()
211
211
212
212
$ this ->filesystem ->mkdir ($ directories );
213
213
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 ' );
217
217
}
218
218
219
219
public function testMkdirCreatesDirectoriesFails ()
@@ -347,7 +347,7 @@ public function testRemoveCleansInvalidLinks()
347
347
348
348
// create symlink to dir using trailing forward slash
349
349
$ this ->filesystem ->symlink ($ basePath .'dir/ ' , $ basePath .'dir-link ' );
350
- $ this ->assertTrue ( is_dir ( $ basePath .'dir-link ' ) );
350
+ $ this ->assertDirectoryExists ( $ basePath .'dir-link ' );
351
351
352
352
// create symlink to nonexistent dir
353
353
rmdir ($ basePath .'dir ' );
@@ -825,7 +825,7 @@ public function testRemoveSymlink()
825
825
826
826
$ this ->assertFalse (is_link ($ link ));
827
827
$ this ->assertFalse (is_file ($ link ));
828
- $ this ->assertFalse ( is_dir ( $ link) );
828
+ $ this ->assertDirectoryNotExists ( $ link );
829
829
}
830
830
831
831
public function testSymlinkIsOverwrittenIfPointsToDifferentTarget ()
@@ -1170,8 +1170,8 @@ public function testMirrorCopiesFilesAndDirectoriesRecursively()
1170
1170
1171
1171
$ this ->filesystem ->mirror ($ sourcePath , $ targetPath );
1172
1172
1173
- $ this ->assertTrue ( is_dir ( $ targetPath) );
1174
- $ this ->assertTrue ( is_dir ( $ targetPath .'directory ' ) );
1173
+ $ this ->assertDirectoryExists ( $ targetPath );
1174
+ $ this ->assertDirectoryExists ( $ targetPath .'directory ' );
1175
1175
$ this ->assertFileEquals ($ file1 , $ targetPath .'directory ' .\DIRECTORY_SEPARATOR .'file1 ' );
1176
1176
$ this ->assertFileEquals ($ file2 , $ targetPath .'file2 ' );
1177
1177
@@ -1204,7 +1204,7 @@ public function testMirrorCreatesEmptyDirectory()
1204
1204
1205
1205
$ this ->filesystem ->mirror ($ sourcePath , $ targetPath );
1206
1206
1207
- $ this ->assertTrue ( is_dir ( $ targetPath) );
1207
+ $ this ->assertDirectoryExists ( $ targetPath );
1208
1208
1209
1209
$ this ->filesystem ->remove ($ sourcePath );
1210
1210
}
@@ -1223,7 +1223,7 @@ public function testMirrorCopiesLinks()
1223
1223
1224
1224
$ this ->filesystem ->mirror ($ sourcePath , $ targetPath );
1225
1225
1226
- $ this ->assertTrue ( is_dir ( $ targetPath) );
1226
+ $ this ->assertDirectoryExists ( $ targetPath );
1227
1227
$ this ->assertFileEquals ($ sourcePath .'file1 ' , $ targetPath .'link1 ' );
1228
1228
$ this ->assertTrue (is_link ($ targetPath .\DIRECTORY_SEPARATOR .'link1 ' ));
1229
1229
}
@@ -1243,7 +1243,7 @@ public function testMirrorCopiesLinkedDirectoryContents()
1243
1243
1244
1244
$ this ->filesystem ->mirror ($ sourcePath , $ targetPath );
1245
1245
1246
- $ this ->assertTrue ( is_dir ( $ targetPath) );
1246
+ $ this ->assertDirectoryExists ( $ targetPath );
1247
1247
$ this ->assertFileEquals ($ sourcePath .'/nested/file1.txt ' , $ targetPath .'link1/file1.txt ' );
1248
1248
$ this ->assertTrue (is_link ($ targetPath .\DIRECTORY_SEPARATOR .'link1 ' ));
1249
1249
}
@@ -1267,7 +1267,7 @@ public function testMirrorCopiesRelativeLinkedContents()
1267
1267
1268
1268
$ this ->filesystem ->mirror ($ sourcePath , $ targetPath );
1269
1269
1270
- $ this ->assertTrue ( is_dir ( $ targetPath) );
1270
+ $ this ->assertDirectoryExists ( $ targetPath );
1271
1271
$ this ->assertFileEquals ($ sourcePath .'/nested/file1.txt ' , $ targetPath .'link1/file1.txt ' );
1272
1272
$ this ->assertTrue (is_link ($ targetPath .\DIRECTORY_SEPARATOR .'link1 ' ));
1273
1273
$ this ->assertEquals ('\\' === \DIRECTORY_SEPARATOR ? realpath ($ sourcePath .'\nested ' ) : 'nested ' , readlink ($ targetPath .\DIRECTORY_SEPARATOR .'link1 ' ));
@@ -1290,7 +1290,7 @@ public function testMirrorContentsWithSameNameAsSourceOrTargetWithoutDeleteOptio
1290
1290
1291
1291
chdir ($ oldPath );
1292
1292
1293
- $ this ->assertTrue ( is_dir ( $ targetPath) );
1293
+ $ this ->assertDirectoryExists ( $ targetPath );
1294
1294
$ this ->assertFileExists ($ targetPath .'source ' );
1295
1295
$ this ->assertFileExists ($ targetPath .'target ' );
1296
1296
}
@@ -1315,7 +1315,7 @@ public function testMirrorContentsWithSameNameAsSourceOrTargetWithDeleteOption()
1315
1315
1316
1316
chdir ($ oldPath );
1317
1317
1318
- $ this ->assertTrue ( is_dir ( $ targetPath) );
1318
+ $ this ->assertDirectoryExists ( $ targetPath );
1319
1319
$ this ->assertFileExists ($ targetPath .'source ' );
1320
1320
$ this ->assertFileNotExists ($ targetPath .'target ' );
1321
1321
}
0 commit comments