mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Making ControllerTestCase abstract, that way PHP won't complain about empty test cases, closes #1868
This commit is contained in:
parent
b15c77ecc3
commit
eaa01634b1
2 changed files with 6 additions and 2 deletions
|
@ -98,6 +98,10 @@ class ControllerTestCaseTestController extends AppController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to get a testable concrete class of the test subject
|
||||||
|
*/
|
||||||
|
class TestingControllerTestCase extends ControllerTestCase {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ControllerTestCaseTest
|
* ControllerTestCaseTest
|
||||||
|
@ -128,7 +132,7 @@ class ControllerTestCaseTest extends CakeTestCase {
|
||||||
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)
|
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)
|
||||||
));
|
));
|
||||||
CakePlugin::loadAll();
|
CakePlugin::loadAll();
|
||||||
$this->Case = new ControllerTestCase();
|
$this->Case = new TestingControllerTestCase();
|
||||||
Router::reload();
|
Router::reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ class InterceptContentHelper extends Helper {
|
||||||
*
|
*
|
||||||
* @package Cake.TestSuite
|
* @package Cake.TestSuite
|
||||||
*/
|
*/
|
||||||
class ControllerTestCase extends CakeTestCase {
|
abstract class ControllerTestCase extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The controller to test in testAction
|
* The controller to test in testAction
|
||||||
|
|
Loading…
Reference in a new issue