mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Making more methods static in TestManager
This commit is contained in:
parent
c23f66e35c
commit
41683723f7
1 changed files with 7 additions and 6 deletions
|
@ -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';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue