function FieldFieldTest::testRevisionTokenRender
Same name in other branches
- 10 core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php \Drupal\Tests\views\Kernel\Handler\FieldFieldTest::testRevisionTokenRender()
Tests the token replacement for revision fields.
File
-
core/
modules/ views/ tests/ src/ Kernel/ Handler/ FieldFieldTest.php, line 504
Class
- FieldFieldTest
- Provides some integration tests for the Field handler.
Namespace
Drupal\Tests\views\Kernel\HandlerCode
public function testRevisionTokenRender() : void {
$view = Views::getView('test_field_field_revision_test');
$this->executeView($view);
$this->assertEquals('Replace: 1', $view->getStyle()
->getField(0, 'field_test__revision_id_1'));
$this->assertEquals('Replace: 2', $view->getStyle()
->getField(1, 'field_test__revision_id_1'));
$this->assertEquals('Replace: 3', $view->getStyle()
->getField(2, 'field_test__revision_id_1'));
$this->assertEquals('Replace: 4', $view->getStyle()
->getField(3, 'field_test__revision_id_1'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.