public function HandlerFieldFieldTest::_testSimpleFieldRender in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/field/src/Tests/Views/HandlerFieldFieldTest.php \Drupal\field\Tests\Views\HandlerFieldFieldTest::_testSimpleFieldRender()
1 call to HandlerFieldFieldTest::_testSimpleFieldRender()
- HandlerFieldFieldTest::testFieldRender in core/
modules/ field/ src/ Tests/ Views/ HandlerFieldFieldTest.php
File
- core/
modules/ field/ src/ Tests/ Views/ HandlerFieldFieldTest.php, line 137 - Contains \Drupal\field\Tests\Views\HandlerFieldFieldTest.
Class
- HandlerFieldFieldTest
- Tests the field itself of the Field integration.
Namespace
Drupal\field\Tests\ViewsCode
public function _testSimpleFieldRender() {
$view = Views::getView('test_view_fieldapi');
$this
->prepareView($view);
$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_name = $this->fieldStorages[$key]
->getName();
$rendered_field = $view->style_plugin
->getField($i, $field_name);
$expected_field = $this->nodes[$i]->{$field_name}->value;
$this
->assertEqual($rendered_field, $expected_field);
}
}
}