FieldHandlersUpdateTest.php in Zircon Profile 8
File
core/modules/views/src/Tests/Update/FieldHandlersUpdateTest.php
View source
<?php
namespace Drupal\views\Tests\Update;
use Drupal\system\Tests\Update\UpdatePathTestBase;
use Drupal\views\Entity\View;
class FieldHandlersUpdateTest extends UpdatePathTestBase {
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
__DIR__ . '/../../../tests/fixtures/update/duplicate-field-handler.php',
];
}
public function testViewsUpdate8004() {
$this
->runUpdates();
$view = View::load('test_duplicate_field_handlers');
$data = $view
->toArray();
$this
->assertEqual('node_field_data', $data['display']['default']['display_options']['fields']['nid']['table']);
$this
->assertEqual('node_field_data', $data['display']['default']['display_options']['filters']['type']['table']);
$this
->assertEqual('node_field_data', $data['display']['default']['display_options']['sorts']['vid']['table']);
$this
->assertEqual('node_field_data', $data['display']['default']['display_options']['arguments']['nid']['table']);
}
}