public function test_module_directories() { $expected = array('functest' => $this->modpath, 'test' => $this->modpath . 'tests/testmodule/'); $this->assertEquals($expected, Functest_Tests::module_directories()); $expected = array('0' => APPPATH, 'functest' => $this->modpath, 'test' => $this->modpath . 'tests/testmodule/'); $this->environment()->set(array('functest.apptests' => TRUE)); $this->assertEquals($expected, Functest_Tests::module_directories()); }
public static function tests() { $files = Kohana::list_files('tests/tests', Functest_Tests::module_directories()); $files = Arr::flatten($files); return array_values(array_filter($files, function ($file) { return substr($file, -8) === 'Test.php'; })); }