mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Updating Javascript group test to recommended usage.
Removing code from the TestManager.
This commit is contained in:
parent
d894f01f70
commit
535c92dee1
2 changed files with 12 additions and 14 deletions
|
@ -35,18 +35,20 @@ class JavascriptGroupTest extends CakeTestSuite {
|
|||
* @access public
|
||||
*/
|
||||
public $label = 'Js Helper and all Engine Helpers';
|
||||
|
||||
/**
|
||||
* AllCoreHelpersGroupTest method
|
||||
* Suite define the tests for this suite
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function __construct($theClass = '', $name = '') {
|
||||
parent::__construct($theClass, $name);
|
||||
public static function suite() {
|
||||
$suite = new PHPUnit_Framework_TestSuite('All Javascript helper tests');
|
||||
|
||||
$helperTestPath = CORE_TEST_CASES . DS . 'libs' . DS . 'view' . DS . 'helpers' . DS;
|
||||
$this->addTestFile($helperTestPath . 'js.test.php');
|
||||
$this->addTestFile($helperTestPath . 'jquery_engine.test.php');
|
||||
$this->addTestFile($helperTestPath . 'mootools_engine.test.php');
|
||||
$this->addTestFile($helperTestPath . 'prototype_engine.test.php');
|
||||
$suite->addTestFile($helperTestPath . 'js.test.php');
|
||||
$suite->addTestFile($helperTestPath . 'jquery_engine.test.php');
|
||||
$suite->addTestFile($helperTestPath . 'mootools_engine.test.php');
|
||||
$suite->addTestFile($helperTestPath . 'prototype_engine.test.php');
|
||||
return $suite;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,13 +171,9 @@ class TestManager {
|
|||
require_once $filePath;
|
||||
$class = basename($groupTestName);
|
||||
$suite = $this->getTestSuite(sprintf(__('%s group test', true), $class));
|
||||
$groupClassName = Inflector::classify($class) . 'GroupTest';
|
||||
$group = new $groupClassName();
|
||||
$suite->addTestSuite($group);
|
||||
if (isset($group->label)) {
|
||||
$suite->setName($group->label);
|
||||
}
|
||||
|
||||
$groupClassName = Inflector::classify($class) . 'GroupTest';
|
||||
$suite->addTestSuite($groupClassName);
|
||||
return $this->run($reporter, $codeCoverage);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue