1 translation.test TranslationTestCase::assertContentByXPath($xpath, array $arguments = array(), $value = NULL, $message = '', $group = 'Other')

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

core/modules/translation/tests/translation.test, line 408
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);
}