| 7 dashboard.test | DashboardBlocksTestCase::testDashboardRegions() |
| 8 dashboard.test | DashboardBlocksTestCase::testDashboardRegions() |
Tests that dashboard regions are displayed or hidden properly.
File
- modules/
dashboard/ dashboard.test, line 66 - Tests for dashboard.module.
Code
function testDashboardRegions() {
$dashboard_regions = dashboard_region_descriptions();
// Ensure blocks can be placed in dashboard regions.
$this->drupalGet('admin/dashboard/configure');
foreach ($dashboard_regions as $region => $description) {
$elements = $this->xpath('//option[@value=:region]', array(':region' => $region));
$this->assertTrue(!empty($elements), t('%region is an available choice on the dashboard block configuration page.', array('%region' => $region)));
}
// Ensure blocks cannot be placed in dashboard regions on the standard
// blocks configuration page.
$this->drupalGet('admin/structure/block');
foreach ($dashboard_regions as $region => $description) {
$elements = $this->xpath('//option[@value=:region]', array(':region' => $region));
$this->assertTrue(empty($elements), t('%region is not an available choice on the block configuration page.', array('%region' => $region)));
}
}
Login or register to post comments