comparison core/modules/node/tests/src/Functional/NodeRevisionsUiTest.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 4c8ae668cc8c
children af1871eacc83
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
158 158
159 $node_id = $node->id(); 159 $node_id = $node->id();
160 160
161 $this->drupalGet('node/' . $node_id . '/revisions'); 161 $this->drupalGet('node/' . $node_id . '/revisions');
162 162
163 // Verify that the latest affected revision having been a default revision
164 // is displayed as the current one.
165 $this->assertNoLinkByHref('/node/' . $node_id . '/revisions/1/revert');
166 $elements = $this->xpath('//tr[contains(@class, "revision-current")]/td/a[1]');
167 // The site may be installed in a subdirectory, so check if the URL is
168 // contained in the retrieved one.
169 $this->assertContains('/node/1', current($elements)->getAttribute('href'));
170
163 // Verify that the default revision can be an older revision than the latest 171 // Verify that the default revision can be an older revision than the latest
164 // one. 172 // one.
165 // Assert that the revisions with translations changes are shown: 1 and 4. 173 // Assert that the revisions with translations changes are shown.
166 $this->assertLinkByHref('/node/' . $node_id . '/revisions/1/revert');
167 $this->assertLinkByHref('/node/' . $node_id . '/revisions/4/revert'); 174 $this->assertLinkByHref('/node/' . $node_id . '/revisions/4/revert');
168 175
169 // Assert that the revisions without translations changes are filtered out: 176 // Assert that the revisions without translations changes are filtered out:
170 // 2, 3 and 5. 177 // 2, 3 and 5.
171 $this->assertNoLinkByHref('/node/' . $node_id . '/revisions/2/revert'); 178 $this->assertNoLinkByHref('/node/' . $node_id . '/revisions/2/revert');