diff options
-rw-r--r-- | modules/system/system.test | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/modules/system/system.test b/modules/system/system.test index 09f49b9f5..f037f73d6 100644 --- a/modules/system/system.test +++ b/modules/system/system.test @@ -432,92 +432,6 @@ class CronRunTestCase extends DrupalWebTestCase { } } - -/** - * Test administration pages and categories. - */ -class AdminOverviewTestCase extends DrupalWebTestCase { - /** - * Implement getInfo(). - */ - public static function getInfo() { - return array( - 'name' => 'Admin overview', - 'description' => 'Confirm that the admin overview page appears as expected.', - 'group' => 'System' - ); - } - - /** - * Test the overview page by task. - */ - function testAdminOverview() { - $admin_user1 = $this->drupalCreateUser(array('access administration pages')); - $this->drupalLogin($admin_user1); - - $this->drupalGet('admin'); - $this->checkOverview(); - - $this->drupalGet('admin/by-module'); - $this->checkOverview(); - - // Comments on permissions follow the format: [task], [module] that the permission relates to. - $permissions = array(); - $permissions[] = 'access administration pages'; - $permissions[] = 'administer nodes'; // Content management, Comment. - $permissions[] = 'administer blocks'; // Structure, Block. - $permissions[] = 'administer filters'; // Site configuration, Filter. - $permissions[] = 'administer users'; // User management, User. - $permissions[] = 'access site reports'; // Reports, Database logging. - $admin_user2 = $this->drupalCreateUser($permissions); - $this->drupalLogin($admin_user2); - - $this->drupalGet('admin'); - $this->checkOverview(array(t('Content management'), t('User management'), t('Reports'), t('Structure'), t('Site configuration'))); - - $this->drupalGet('admin/by-module'); - $this->checkOverview(array(t('Node'), t('Block'), t('Filter'), t('User'), t('Database logging'))); - } - - /** - * Check the overview page panels. - * - * @param array $panels List of panels to be found. - */ - function checkOverview(array $panels = array()) { - if ($this->parse()) { - $found = 0; - $divs = $this->xpath("//div[@class='admin-panel']"); - foreach ($divs as $panel) { - if (in_array(trim($panel->h3), $panels)) { - $found++; - } - } - $this->assertTrue(count($panels) == $found, t('Required panels found.')); - } - } - - /** - * Test administrative menu categories. - */ - public function testHideEmptyCategories() { - $user = $this->drupalCreateUser(array('administer nodes', 'access administration pages')); - $this->drupalLogin($user); - - $this->drupalGet('admin'); - - // Make sure menu items with children are displayed. - $this->assertLink(t('Administer')); - $this->assertLink(t('Content management')); - - // Make sure menu items without children are hidden. - $this->assertNoLink(t('Site configuration')); - $this->assertNoLink(t('Structure')); - $this->assertNoLink(t('User management')); - $this->assertNoLink(t('Reports')); - } -} - class AdminMetaTagTestCase extends DrupalWebTestCase { /** * Implement getInfo(). |