Mercurial > hg > isophonics-drupal-site
comparison core/modules/views/src/Tests/Update/EntityLinkOutputUrlUpdateTest.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\views\Tests\Update; | |
4 | |
5 use Drupal\system\Tests\Update\UpdatePathTestBase; | |
6 use Drupal\views\Entity\View; | |
7 | |
8 /** | |
9 * Tests that the additional settings are added to the entity link field. | |
10 * | |
11 * @see views_post_update_entity_link_url() | |
12 * | |
13 * @group Update | |
14 */ | |
15 class EntityLinkOutputUrlUpdateTest extends UpdatePathTestBase { | |
16 | |
17 /** | |
18 * {@inheritdoc} | |
19 */ | |
20 protected function setDatabaseDumpFiles() { | |
21 $this->databaseDumpFiles = [ | |
22 __DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz', | |
23 __DIR__ . '/../../../tests/fixtures/update/entity-link-output-url.php', | |
24 ]; | |
25 } | |
26 | |
27 /** | |
28 * Tests that the additional settings are added to the config. | |
29 */ | |
30 public function testViewsPostUpdateEntityLinkUrl() { | |
31 $this->runUpdates(); | |
32 | |
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']); | |
39 } | |
40 | |
41 } |