You are here

public function RenderExampleTestCase::assertRenderResults in Examples for Developers 7

Assert that all of the xpaths in the array have results.

Parameters

array $xpath_array: An array of xpaths, each of which must return something.

1 call to RenderExampleTestCase::assertRenderResults()
RenderExampleTestCase::testRenderExampleBasic in render_example/render_example.test
Basic test of rendering through user interaction.

File

render_example/render_example.test, line 41
Test for the render example module.

Class

RenderExampleTestCase
Functional tests for the Render Example module.

Code

public function assertRenderResults($xpath_array) {
  foreach ($xpath_array as $xpath) {
    $result = $this
      ->xpath($xpath);
    $this
      ->assertTrue(!empty($result), format_string('Found xpath %xpath', array(
      '%xpath' => $xpath,
    )));
  }
}