public function AdminViewsSystemDisplayTestCase::testRouterItemInheritance in Administration Views 7
Tests proper inheritance of router item properties.
File
- tests/
admin_views.test, line 129 - Tests for the Administration Views module.
Class
- AdminViewsSystemDisplayTestCase
- Tests System display functionality.
Code
public function testRouterItemInheritance() {
$this
->drupalLogin($this->admin_user);
$path = 'admin/people';
$out = $this
->drupalGet($path);
$this
->assertOriginalRouterItem('user', $path);
// Verify that local tasks and actions exist and can be accessed.
foreach (array(
t('List'),
t('Permissions'),
t('Add user'),
) as $link) {
$this
->drupalSetContent($out);
$this
->assertLink($link);
$this
->clickLink($link);
$this
->assertResponse(200);
}
// Test that child page callbacks of a system display work.
$this
->drupalGet('admin/content/admin_views_test');
$this
->assertResponse(200);
$this
->assertTitle('Administration views test | Drupal');
$this
->assertText('Administration views test page callback');
}