Esempio n. 1
0
 public function test_list_files()
 {
     $expected = array('functest' => array($this->modpath . $this->test_folder . 'test_file1.txt', $this->modpath . $this->test_folder . 'test_file2.txt'), 'test' => array($this->modpath . 'tests/testmodule/' . $this->test_folder . 'test_file1.txt'));
     $list_files = Functest_Tests::list_files($this->test_folder, array('functest' => $this->modpath));
     sort($list_files['functest']);
     $this->assertEquals($expected, $list_files);
 }
Esempio n. 2
0
 public static function fixture_files()
 {
     $search_directory = 'tests' . DIRECTORY_SEPARATOR . 'database' . DIRECTORY_SEPARATOR . 'fixtures';
     $fixture_files = Functest_Tests::list_files($search_directory, Functest_Tests::module_directories());
     if (count($fixture_files) > 1) {
         $fixture_files = call_user_func_array('Arr::merge', $fixture_files);
     }
     $flattened_files = array_values(Arr::flatten($fixture_files));
     sort($flattened_files);
     return $flattened_files;
 }