Skip to content

Commit

Permalink
Making more methods static in TestManager
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed May 5, 2010
1 parent c23f66e commit 4168372
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions cake/tests/lib/test_manager.php
Expand Up @@ -250,7 +250,7 @@ static function &getGroupTestList() {
* @static
*/
protected static function &_getTestGroupFileList($directory = '.') {
$return = self::_getRecursiveFileList($directory, array(self, '_isTestGroupFile'));
$return = self::_getRecursiveFileList($directory, 'self::_isTestGroupFile');
return $return;
}

Expand Down Expand Up @@ -356,17 +356,18 @@ protected static function _hasExpectedExtension($file, $extension) {
*
* @param string $type either 'cases' or 'groups'
* @return string The path tests are located on
* @static
*/
protected function _getTestsPath($type = 'cases') {
if (!empty($this->appTest)) {
protected static function _getTestsPath($type = 'cases') {
if (!empty(self::$appTest)) {
if ($type == 'cases') {
$result = APP_TEST_CASES;
} else if ($type == 'groups') {
$result = APP_TEST_GROUPS;
}
} else if (!empty($this->pluginTest)) {
$_pluginBasePath = APP . 'plugins/' . $this->pluginTest . '/tests';
$pluginPath = App::pluginPath($this->pluginTest);
} else if (!empty(self::$pluginTest)) {
$_pluginBasePath = APP . 'plugins/' . self::$pluginTest . '/tests';
$pluginPath = App::pluginPath(self::$pluginTest);
if (file_exists($pluginPath . DS . 'tests')) {
$_pluginBasePath = $pluginPath . DS . 'tests';
}
Expand Down

0 comments on commit 4168372

Please sign in to comment.