toolbar_admin_menu.test in Hide the Toolbar 7
File
toolbar_admin_menu.test
View source
<?php
class ToolbarAdminMenuTestCase extends DrupalWebTestCase {
private $account;
public static function getInfo() {
return array(
'name' => 'Hide the Toolbar',
'description' => 'Tests that the core toolbar is hidden with the administration menu is present.',
'group' => 'Hide the Toolbar',
);
}
public function setup() {
parent::setUp(array(
'admin_menu',
'toolbar',
'toolbar_admin_menu',
));
$this
->drupalLogin($this
->drupalCreateUser(array(
'access toolbar',
'access administration menu',
)));
}
public function testToolbarAndAdminMenu() {
$this
->assertRaw('<div id="admin-menu-wrapper">', t('The admin menu is visible.'));
$this
->assertNoRaw('<div id="toolbar" class="toolbar overlay-displace-top clearfix">', t('Toolbar is not visible.'));
}
}