1 render_example.test public RenderExampleTestCase::assertRenderedText($xpath_array)

Asserts that the string value of the result is the same as the passed text.

Parameters

array $xpath_array: Array of keyed arrays of tests to be made. Each child array consists of $xpath => $expected_text

File

modules/examples/render_example/tests/render_example.test, line 29
Test for the render example module.

Class

RenderExampleTestCase
Functional tests for the Render Example module.

Code

public function assertRenderedText($xpath_array) {
  foreach ($xpath_array as $xpath => $text) {
    $result = $this->xpath($xpath);
    $this->assertTrue((string) $result[0][0] == $text, format_string('%ary selects text %text', array('%ary' => $xpath, '%text' => $text)));
  }
}