You are here

protected function AdminViewsWebTestCase::assertOriginalRouterItem in Administration Views 7

2 calls to AdminViewsWebTestCase::assertOriginalRouterItem()
AdminViewsDefaultViewsTestCase::testComment in tests/admin_views.test
Tests basic appearance and behavior of built-in default views.
AdminViewsSystemDisplayTestCase::testRouterItemInheritance in tests/admin_views.test
Tests proper inheritance of router item properties.

File

tests/admin_views.test, line 76
Tests for the Administration Views module.

Class

AdminViewsWebTestCase
Base class for all Administration Views web test cases.

Code

protected function assertOriginalRouterItem($module, $path) {

  // Retrieve the original router item definition.
  $items = module_invoke($module, 'menu');
  $original_item = $items[$path];

  // Retrieve the computed router item definition.
  $item = menu_get_item($path);

  // Verify that basic properties are identical.
  $title = isset($original_item['title callback']) ? $original_item['title callback']() : $original_item['title'];
  $this
    ->assertEqual($title, $item['title']);
  if (isset($original_item['description'])) {
    $this
      ->assertEqual($original_item['description'], $item['description']);
  }

  // Verify that the title appears.
  $this
    ->assertResponse(200);
  $this
    ->assertText($original_item['title']);
}