From 7761fa687a2380716849d49b6520dd2a1f952c40 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Fri, 19 Jul 2013 13:46:37 +0200 Subject: Proper directory_map test skip * added the needed trailing backslash * use is_dir() instead of opendir() as it doesn't throw error on failure --- tests/codeigniter/helpers/directory_helper_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/codeigniter/helpers/directory_helper_test.php b/tests/codeigniter/helpers/directory_helper_test.php index d86047349..66e66d269 100644 --- a/tests/codeigniter/helpers/directory_helper_test.php +++ b/tests/codeigniter/helpers/directory_helper_test.php @@ -28,8 +28,8 @@ class Directory_helper_test extends CI_TestCase { vfsStream::create($structure, $this->_test_dir); - // opendir() seems to fail on Windows + vfsStream when there are trailing slashes in directory names - if ( ! @opendir(vfsStream::url('testDir'))) + // is_dir(), opendir(), etc. seem to fail on Windows + vfsStream when there are trailing backslashes in directory names + if (DIRECTORY_SEPARATOR === '\\' && ! is_dir(vfsStream::url('testDir').'\\')) { $this->markTestSkipped(); return; -- cgit v1.2.3-24-g4f1b From 69088d8796457d083c3920361732ae5a7fe50902 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Fri, 19 Jul 2013 20:13:51 +0200 Subject: Simplify directory_map test skip --- tests/codeigniter/helpers/directory_helper_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/codeigniter/helpers/directory_helper_test.php b/tests/codeigniter/helpers/directory_helper_test.php index 66e66d269..de72dee78 100644 --- a/tests/codeigniter/helpers/directory_helper_test.php +++ b/tests/codeigniter/helpers/directory_helper_test.php @@ -29,7 +29,7 @@ class Directory_helper_test extends CI_TestCase { vfsStream::create($structure, $this->_test_dir); // is_dir(), opendir(), etc. seem to fail on Windows + vfsStream when there are trailing backslashes in directory names - if (DIRECTORY_SEPARATOR === '\\' && ! is_dir(vfsStream::url('testDir').'\\')) + if ( ! is_dir(vfsStream::url('testDir').DIRECTORY_SEPARATOR)) { $this->markTestSkipped(); return; -- cgit v1.2.3-24-g4f1b