public function FieldFieldTest::testRevisionExecute in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Tests/Handler/FieldFieldTest.php \Drupal\views\Tests\Handler\FieldFieldTest::testRevisionExecute()
Tests the revision result.
File
- core/
modules/ views/ src/ Tests/ Handler/ FieldFieldTest.php, line 421 - Contains \Drupal\views\Tests\Handler\FieldFieldTest.
Class
- FieldFieldTest
- Provides some integration tests for the Field handler.
Namespace
Drupal\views\Tests\HandlerCode
public function testRevisionExecute() {
$executable = Views::getView('test_field_field_revision_test');
$executable
->execute();
$this
->assertTrue($executable->field['name'] instanceof Field);
$this
->assertTrue($executable->field['field_test'] instanceof Field);
$this
->assertIdenticalResultset($executable, [
[
'id' => 1,
'field_test' => 1,
'revision_id' => 1,
'name' => 'base value',
],
[
'id' => 1,
'field_test' => 2,
'revision_id' => 2,
'name' => 'revision value1',
],
[
'id' => 1,
'field_test' => 3,
'revision_id' => 3,
'name' => 'revision value2',
],
[
'id' => 2,
'field_test' => 4,
'revision_id' => 4,
'name' => 'next entity value',
],
], [
'entity_test_rev_revision_id' => 'id',
'revision_id' => 'revision_id',
'name' => 'name',
'field_test' => 'field_test',
]);
}