assertPattern(), be sure to use the 's' modifier for * the PCRE pattern, since admin menu's output spans over multiple lines. */ /** * Test menu links depending on user permissions. */ class AdminMenuPermissionsTestCase extends DrupalWebTestCase { public static function getInfo() { return array( 'name' => t('Menu link permissions'), 'description' => t('Verify that menu is displayed according to user permissions.'), 'group' => t('Administration menu'), ); } function setUp() { parent::setUp('admin_menu'); admin_menu_exit(); } /** * Test that the links are added to the page (no JS testing). */ function testPermissions() { // Anonymous users should not see the menu. $this->assertNoRaw('