protected function ALProfilesWebTest::assertAcquiaLiftWebAdminLink in Acquia Lift Connector 7.2
Same name and namespace in other branches
- 7 acquia_lift_profiles/tests/acquia_lift_profiles.test \ALProfilesWebTest::assertAcquiaLiftWebAdminLink()
Helper function to assert that the Acquia Lift Web Admin link is set to a specific href.
This can't be tested via the UI because there isn't a way to activate the Acquia Lift menu, but we can all the menu functions to verify that the href is updated as expected.
Parameters
$check_href:
1 call to ALProfilesWebTest::assertAcquiaLiftWebAdminLink()
- ALProfilesWebTest::testAdminLink in acquia_lift_profiles/
tests/ acquia_lift_profiles.test
File
- acquia_lift_profiles/
tests/ acquia_lift_profiles.test, line 585 - Tests for Acquia Lift Profiles module.
Class
- ALProfilesWebTest
- Tests Acquia Lift Profiles functionality.
Code
protected function assertAcquiaLiftWebAdminLink($check_href) {
// Make sure we get a new copy of the data each time we assert.
drupal_static_reset('menu_tree_all_data');
drupal_static_reset('_menu_build_tree');
$menu = menu_tree_all_data('acquia-lift-controls');
foreach ($menu as $link) {
if ($link['link']['link_path'] === 'http://lift.acquia.com') {
$this
->assertEqual($link['link']['href'], $check_href);
return;
}
}
$this
->assertEqual('Link not found', $check_href);
}