public function viewsHandlerFieldFieldTest::_testSimpleFieldRender in Views (for Drupal 7) 7.3
1 call to viewsHandlerFieldFieldTest::_testSimpleFieldRender()
- viewsHandlerFieldFieldTest::testFieldRender in tests/
field/ views_fieldapi.test
File
- tests/
field/ views_fieldapi.test, line 334 - Tests the fieldapi integration of viewsdata.
Class
- viewsHandlerFieldFieldTest
- Tests the field_field handler.
Code
public function _testSimpleFieldRender() {
$view = $this
->getFieldView();
$this
->executeView($view);
// Tests that the rendered fields match the actual value of the fields.
for ($i = 0; $i < 3; $i++) {
for ($key = 0; $key < 2; $key++) {
$field = $this->fields[$key];
$rendered_field = $view->style_plugin
->get_field($i, $field['field_name']);
$expected_field = $this->nodes[$i]->{$field['field_name']}[LANGUAGE_NONE][0]['value'];
$this
->assertEqual($rendered_field, $expected_field);
}
}
}