Mercurial > hg > isophonics-drupal-site
comparison core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | c2387f117808 |
children | af1871eacc83 |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
44 [ | 44 [ |
45 'view page revisions', | 45 'view page revisions', |
46 'revert page revisions', | 46 'revert page revisions', |
47 'delete page revisions', | 47 'delete page revisions', |
48 'edit any page content', | 48 'edit any page content', |
49 'delete any page content' | 49 'delete any page content', |
50 ] | 50 ] |
51 ); | 51 ); |
52 $this->drupalLogin($web_user); | 52 $this->drupalLogin($web_user); |
53 | 53 |
54 // Create an initial node. | 54 // Create an initial node. |
120 [ | 120 [ |
121 'view all revisions', | 121 'view all revisions', |
122 'revert all revisions', | 122 'revert all revisions', |
123 'delete all revisions', | 123 'delete all revisions', |
124 'edit any page content', | 124 'edit any page content', |
125 'delete any page content' | 125 'delete any page content', |
126 ] | 126 ] |
127 ); | 127 ); |
128 $this->drupalLogin($content_admin); | 128 $this->drupalLogin($content_admin); |
129 | 129 |
130 // Confirm the correct revision text appears on "view revisions" page. | 130 // Confirm the correct revision text appears on "view revisions" page. |
145 $this->drupalPostForm("node/" . $node->id() . "/revisions/" . $nodes[1]->getRevisionId() . "/revert", [], t('Revert')); | 145 $this->drupalPostForm("node/" . $node->id() . "/revisions/" . $nodes[1]->getRevisionId() . "/revert", [], t('Revert')); |
146 $this->assertRaw(t('@type %title has been reverted to the revision from %revision-date.', | 146 $this->assertRaw(t('@type %title has been reverted to the revision from %revision-date.', |
147 [ | 147 [ |
148 '@type' => 'Basic page', | 148 '@type' => 'Basic page', |
149 '%title' => $nodes[1]->getTitle(), | 149 '%title' => $nodes[1]->getTitle(), |
150 '%revision-date' => format_date($nodes[1]->getRevisionCreationTime()) | 150 '%revision-date' => format_date($nodes[1]->getRevisionCreationTime()), |
151 ]), | 151 ]), |
152 'Revision reverted.'); | 152 'Revision reverted.'); |
153 $node_storage->resetCache([$node->id()]); | 153 $node_storage->resetCache([$node->id()]); |
154 $reverted_node = $node_storage->load($node->id()); | 154 $reverted_node = $node_storage->load($node->id()); |
155 $this->assertTrue(($nodes[1]->body->value == $reverted_node->body->value), 'Node reverted correctly.'); | 155 $this->assertTrue(($nodes[1]->body->value == $reverted_node->body->value), 'Node reverted correctly.'); |