1 theme.test | RenderElementTypesTestCase::assertElements($elements) |
Asserts that an array of elements is rendered properly.
Parameters
array $elements: An array of associative arrays describing render elements and their expected markup. Each item in $elements must contain the following:
- 'name': This human readable description will be displayed on the test results page.
- 'value': This is the render element to test.
- 'expected': This is the expected markup for the element in 'value'.
File
- core/
modules/ simpletest/ tests/ theme.test, line 603 - Tests for the theme API.
Class
- RenderElementTypesTestCase
- Tests the markup of core render element types passed to backdrop_render().
Code
function assertElements($elements) {
foreach ($elements as $element) {
$this->assertIdentical(backdrop_render($element['value']), $element['expected'], '"' . $element['name'] . '" input rendered correctly by backdrop_render().');
}
}