You are here

function TranslationTestCase::assertContentByXPath in Drupal 7

Asserts an element identified by the given XPath has the given content.

Parameters

$xpath: The XPath used to find the element.

array $arguments: An array of arguments with keys in the form ':name' matching the placeholders in the query. The values may be either strings or numeric values.

$value: The text content of the matched element to assert.

$message: The message to display.

$group: The group this message belongs to.

Return value

TRUE on pass, FALSE on fail.

File

modules/translation/translation.test, line 402
Tests for the Translation module.

Class

TranslationTestCase
Functional tests for the Translation module.

Code

function assertContentByXPath($xpath, array $arguments = array(), $value = NULL, $message = '', $group = 'Other') {
  $found = $this
    ->findContentByXPath($xpath, $arguments, $value);
  return $this
    ->assertTrue($found, $message, $group);
}