mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Fixing failing tests because of core routes not being loaded.
This commit is contained in:
parent
16073b4e44
commit
c37c641b4a
1 changed files with 3 additions and 0 deletions
|
@ -273,7 +273,9 @@ class ControllerTestCaseTest extends CakeTestCase {
|
|||
* Tests using loaded routes during tests
|
||||
*/
|
||||
public function testUseRoutes() {
|
||||
Router::connect('/:controller/:action/*');
|
||||
include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php';
|
||||
|
||||
$controller = $this->Case->generate('TestsApps');
|
||||
$controller->Components->load('RequestHandler');
|
||||
$result = $this->Case->testAction('/tests_apps/index.json', array('return' => 'view'));
|
||||
|
@ -302,6 +304,7 @@ class ControllerTestCaseTest extends CakeTestCase {
|
|||
* @expectedException MissingActionException
|
||||
*/
|
||||
public function testSkipRoutes() {
|
||||
Router::connect('/:controller/:action/*');
|
||||
include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php';
|
||||
|
||||
$this->Case->loadRoutes = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue