Making more methods static in TestManager

This commit is contained in:
José Lorenzo Rodríguez 2010-05-04 21:04:18 -04:30
parent c23f66e35c
commit 41683723f7

View file

@ -250,7 +250,7 @@ class TestManager {
* @static * @static
*/ */
protected static function &_getTestGroupFileList($directory = '.') { protected static function &_getTestGroupFileList($directory = '.') {
$return = self::_getRecursiveFileList($directory, array(self, '_isTestGroupFile')); $return = self::_getRecursiveFileList($directory, 'self::_isTestGroupFile');
return $return; return $return;
} }
@ -356,17 +356,18 @@ class TestManager {
* *
* @param string $type either 'cases' or 'groups' * @param string $type either 'cases' or 'groups'
* @return string The path tests are located on * @return string The path tests are located on
* @static
*/ */
protected function _getTestsPath($type = 'cases') { protected static function _getTestsPath($type = 'cases') {
if (!empty($this->appTest)) { if (!empty(self::$appTest)) {
if ($type == 'cases') { if ($type == 'cases') {
$result = APP_TEST_CASES; $result = APP_TEST_CASES;
} else if ($type == 'groups') { } else if ($type == 'groups') {
$result = APP_TEST_GROUPS; $result = APP_TEST_GROUPS;
} }
} else if (!empty($this->pluginTest)) { } else if (!empty(self::$pluginTest)) {
$_pluginBasePath = APP . 'plugins/' . $this->pluginTest . '/tests'; $_pluginBasePath = APP . 'plugins/' . self::$pluginTest . '/tests';
$pluginPath = App::pluginPath($this->pluginTest); $pluginPath = App::pluginPath(self::$pluginTest);
if (file_exists($pluginPath . DS . 'tests')) { if (file_exists($pluginPath . DS . 'tests')) {
$_pluginBasePath = $pluginPath . DS . 'tests'; $_pluginBasePath = $pluginPath . DS . 'tests';
} }