From c576995304fc3609cca0b7b92d1b2cd611ec82f5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 16 Jan 2019 17:49:35 +0200 Subject: [ci skip] 3.1.10 release --- .../codeigniter/helpers/directory_helper_test.php | 59 ---------------------- 1 file changed, 59 deletions(-) delete mode 100644 tests/codeigniter/helpers/directory_helper_test.php (limited to 'tests/codeigniter/helpers/directory_helper_test.php') 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 @@ -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)); - } - -} -- cgit v1.2.3-24-g4f1b