diff options
author | Andrey Andreev <narf@devilix.net> | 2018-01-13 12:57:11 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2018-01-13 12:57:11 +0100 |
commit | 02a0518e1c56ba3506f370362ac5ebdb8a138312 (patch) | |
tree | 8b4684192b403dcae17d298eb4fc9e7ab001acad /tests/codeigniter/helpers/directory_helper_test.php | |
parent | f0b9735d5857e6c07c8f5824b13cff4828db3cfe (diff) |
[ci skip] 3.1.7 release
Diffstat (limited to 'tests/codeigniter/helpers/directory_helper_test.php')
-rw-r--r-- | tests/codeigniter/helpers/directory_helper_test.php | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/tests/codeigniter/helpers/directory_helper_test.php b/tests/codeigniter/helpers/directory_helper_test.php deleted file mode 100644 index 253c1e368..000000000 --- a/tests/codeigniter/helpers/directory_helper_test.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php - -class Directory_helper_test extends CI_TestCase { - - public function set_up() - { - $this->helper('directory'); - - vfsStreamWrapper::register(); - vfsStreamWrapper::setRoot(new vfsStreamDirectory('testDir')); - - $this->_test_dir = vfsStreamWrapper::getRoot(); - } - - public function test_directory_map() - { - $ds = DIRECTORY_SEPARATOR; - - $structure = array( - 'libraries' => array( - 'benchmark.html' => '', - 'database' => array('active_record.html' => '', 'binds.html' => ''), - 'email.html' => '', - '0' => '', - '.hiddenfile.txt' => '' - ) - ); - - 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 ( ! is_dir(vfsStream::url('testDir').DIRECTORY_SEPARATOR)) - { - $this->markTestSkipped("Can't test this under Windows"); - return; - } - - // test default recursive behavior - $expected = array( - 'libraries'.$ds => array( - 'benchmark.html', - 'database'.$ds => array('active_record.html', 'binds.html'), - 'email.html', - '0' - ) - ); - - $this->assertEquals($expected, directory_map(vfsStream::url('testDir'))); - - // test detection of hidden files - $expected['libraries'.$ds][] = '.hiddenfile.txt'; - - $this->assertEquals($expected, directory_map(vfsStream::url('testDir'), 0, TRUE)); - - // test recursion depth behavior - $this->assertEquals(array('libraries'.$ds), directory_map(vfsStream::url('testDir'), 1)); - } - -} |