mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fixing test case as it was error prone. Assuming the first value of $plugins array to be 'plugin_js' was incorrect.
This commit is contained in:
parent
373bebb128
commit
d04b327469
1 changed files with 2 additions and 4 deletions
|
@ -1786,7 +1786,7 @@ class RouterTest extends CakeTestCase {
|
|||
*/
|
||||
function testUrlWritingWithPrefixesAndCustomRoutes() {
|
||||
Router::connect(
|
||||
'/admin/login',
|
||||
'/admin/login',
|
||||
array('controller' => 'users', 'action' => 'login', 'prefix' => 'admin', 'admin' => true)
|
||||
);
|
||||
Router::setRequestInfo(array(
|
||||
|
@ -2007,9 +2007,7 @@ class RouterTest extends CakeTestCase {
|
|||
App::objects('plugin', null, false);
|
||||
Router::reload();
|
||||
|
||||
$plugins = App::objects('plugin');
|
||||
$plugin = Inflector::underscore($plugins[0]);
|
||||
$result = Router::url(array('plugin' => $plugin, 'controller' => 'js_file', 'action' => 'index'));
|
||||
$result = Router::url(array('plugin' => 'plugin_js', 'controller' => 'js_file', 'action' => 'index'));
|
||||
$this->assertEqual($result, '/plugin_js/js_file');
|
||||
|
||||
$result = Router::parse('/plugin_js/js_file');
|
||||
|
|
Loading…
Add table
Reference in a new issue