You are here

protected function DrupalWebTestCase::assertTitle in Drupal 7

Pass if the page title is the given string.

Parameters

$title: The string the title should be.

$message: Message to display.

$group: The group this message belongs to.

Return value

TRUE on pass, FALSE on fail.

27 calls to DrupalWebTestCase::assertTitle()
BlogTestCase::testBlogPageNoEntries in modules/blog/blog.test
View the blog of a user with no blog entries as another user.
BlogTestCase::testUnprivilegedUser in modules/blog/blog.test
Confirm that the "You are not allowed to post a new blog entry." message shows up if a user submitted blog entries, has been denied that permission, and goes to the blog page.
BlogTestCase::verifyBlogLinks in modules/blog/blog.test
Verify the blog links are displayed to the logged in user.
BlogTestCase::verifyBlogs in modules/blog/blog.test
Verify the logged in user has the desired access to the various blog nodes.
BootstrapPageCacheTestCase::testPageCompression in modules/simpletest/tests/bootstrap.test
Test page compression.

... See full list

File

modules/simpletest/drupal_web_test_case.php, line 3443

Class

DrupalWebTestCase
Test case for typical Drupal tests.

Code

protected function assertTitle($title, $message = '', $group = 'Other') {
  $actual = (string) current($this
    ->xpath('//title'));
  if (!$message) {
    $message = t('Page title @actual is equal to @expected.', array(
      '@actual' => var_export($actual, TRUE),
      '@expected' => var_export($title, TRUE),
    ));
  }
  return $this
    ->assertEqual($actual, $title, $message, $group);
}