Posted by alexpott on February 20, 2013 at 11:42pm
6 followers
| Project: | Drupal core |
| Version: | 8.x-dev |
| Component: | menu system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I have no idea how MenuRouterTest currently passes on the testbots. I can not get the test to pass locally I get the following failures:
Test summary
------------
Menu router 218 passes, 6 fails, 6 exceptions, and 41 debug messages
Status Group Filename Line Function
--------------------------------------------------------------------------------
Exception Notice MenuRouterTest.ph 376 Drupal\system\Tests\Menu\MenuRouter
Undefined index:
menu-test/hidden/menu/manage/%Drupal\system\Tests\Menu\MenuRouterTest->testMenuHidden()
Drupal\simpletest\TestBase->run()
simpletest_script_run_one_test('19',
'Drupal\system\Tests\Menu\MenuRouterTest')
Fail Other MenuRouterTest.ph 377 Drupal\system\Tests\Menu\MenuRouter
depth is equal to 4.
Fail Other MenuRouterTest.ph 378 Drupal\system\Tests\Menu\MenuRouter
plid is equal to 111.
Exception Notice MenuRouterTest.ph 380 Drupal\system\Tests\Menu\MenuRouter
Undefined index:
menu-test/hidden/menu/manage/%Drupal\system\Tests\Menu\MenuRouterTest->testMenuHidden()
Drupal\simpletest\TestBase->run()
simpletest_script_run_one_test('19',
'Drupal\system\Tests\Menu\MenuRouterTest')
Exception Notice MenuRouterTest.ph 384 Drupal\system\Tests\Menu\MenuRouter
Undefined index:
menu-test/hidden/menu/manage/%/listDrupal\system\Tests\Menu\MenuRouterTest->testMenuHidden()
Drupal\simpletest\TestBase->run()
simpletest_script_run_one_test('19',
'Drupal\system\Tests\Menu\MenuRouterTest')
Fail Other MenuRouterTest.ph 385 Drupal\system\Tests\Menu\MenuRouter
depth is equal to 1.
Pass Other MenuRouterTest.ph 386 Drupal\system\Tests\Menu\MenuRouter
plid is equal to .
Exception Notice MenuRouterTest.ph 388 Drupal\system\Tests\Menu\MenuRouter
Undefined index:
menu-test/hidden/menu/manage/%/addDrupal\system\Tests\Menu\MenuRouterTest->testMenuHidden()
Drupal\simpletest\TestBase->run()
simpletest_script_run_one_test('19',
'Drupal\system\Tests\Menu\MenuRouterTest')
Fail Other MenuRouterTest.ph 389 Drupal\system\Tests\Menu\MenuRouter
depth is equal to 1.
Pass Other MenuRouterTest.ph 390 Drupal\system\Tests\Menu\MenuRouter
plid is equal to .
Exception Notice MenuRouterTest.ph 392 Drupal\system\Tests\Menu\MenuRouter
Undefined index:
menu-test/hidden/menu/manage/%/editDrupal\system\Tests\Menu\MenuRouterTest->testMenuHidden()
Drupal\simpletest\TestBase->run()
simpletest_script_run_one_test('19',
'Drupal\system\Tests\Menu\MenuRouterTest')
Fail Other MenuRouterTest.ph 393 Drupal\system\Tests\Menu\MenuRouter
depth is equal to 1.
Pass Other MenuRouterTest.ph 394 Drupal\system\Tests\Menu\MenuRouter
plid is equal to .
Exception Notice MenuRouterTest.ph 396 Drupal\system\Tests\Menu\MenuRouter
Undefined index:
menu-test/hidden/menu/manage/%/deleteDrupal\system\Tests\Menu\MenuRouterTest->testMenuHidden()
Drupal\simpletest\TestBase->run()
simpletest_script_run_one_test('19',
'Drupal\system\Tests\Menu\MenuRouterTest')This is due to there being no menu_load function as the menu module is not enabled. When we build the router table in http://api.drupal.org/api/drupal/core%21includes%21menu.inc/function/_me... if the path contains
%something we look for a function something_load() if we find it we replace the %something with %. This is not happening and hence the tests fail.
Basically since the menu_test module declares paths with %menu in them and then the router test looks for paths like 'menu-test/hidden/menu/manage/%' there is an unmet dependency on the menu module.
Comments
#1
This fixes the reported issue.
#2
Okay so this test fails if you install the minimal profile and does not fail if you install standard profile. So somehow that parent environment is leaking into the test environment.
#3
The testbots install standard profile... this should probably change as it would result in quicker tests but that's outside the scope of this patch... the problem happens because (quoting Berdir)
#4
Which is known and can not be changed. I'd suggest to open a follow-up issue to check if we can use the minimal profile on the testbot for the parent site to expose bugs like this one and possibly also speed up tests a bit, as installing standard takes longer and longer in 8.x. Won't make much of a difference for core but most contrib modules only have tests that take a few minutes...
This is RTBC.
#5
Ick. :\ Ungood. Thanks for catching this.
Committed and pushed to 8.x. Thanks!
#6
Automatically closed -- issue fixed for 2 weeks with no activity.