3 namespace Drupal\Tests\views\Functional\Update;
5 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
6 use Drupal\views\Entity\View;
9 * Tests that the additional settings are added to the entity link field.
11 * @see views_post_update_entity_link_url()
15 class EntityLinkOutputUrlUpdateTest extends UpdatePathTestBase {
20 protected function setDatabaseDumpFiles() {
21 $this->databaseDumpFiles = [
22 __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
23 __DIR__ . '/../../../fixtures/update/entity-link-output-url.php',
28 * Tests that the additional settings are added to the config.
30 public function testViewsPostUpdateEntityLinkUrl() {
33 // Load and initialize our test view.
34 $view = View::load('node_link_update_test');
35 $data = $view->toArray();
36 // Check that the field contains the new values.
37 $this->assertIdentical(FALSE, $data['display']['default']['display_options']['fields']['view_node']['output_url_as_text']);
38 $this->assertIdentical(FALSE, $data['display']['default']['display_options']['fields']['view_node']['absolute']);