Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/node/tests/src/Functional/NodeRevisionsUiTest.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | c75dbcec494b |
children |
comparison
equal
deleted
inserted
replaced
4:a9cd425dd02b | 5:12f9dff5fda9 |
---|---|
110 $nodes[] = clone $node; | 110 $nodes[] = clone $node; |
111 | 111 |
112 $this->drupalGet('node/' . $node->id() . '/revisions'); | 112 $this->drupalGet('node/' . $node->id() . '/revisions'); |
113 | 113 |
114 // Assert the old revision message. | 114 // Assert the old revision message. |
115 $date = format_date($nodes[0]->revision_timestamp->value, 'short'); | 115 $date = $this->container->get('date.formatter')->format($nodes[0]->revision_timestamp->value, 'short'); |
116 $url = new Url('entity.node.revision', ['node' => $nodes[0]->id(), 'node_revision' => $nodes[0]->getRevisionId()]); | 116 $url = new Url('entity.node.revision', ['node' => $nodes[0]->id(), 'node_revision' => $nodes[0]->getRevisionId()]); |
117 $this->assertRaw(\Drupal::l($date, $url) . ' by ' . $editor); | 117 $this->assertRaw(\Drupal::l($date, $url) . ' by ' . $editor); |
118 | 118 |
119 // Assert the current revision message. | 119 // Assert the current revision message. |
120 $date = format_date($nodes[1]->revision_timestamp->value, 'short'); | 120 $date = $this->container->get('date.formatter')->format($nodes[1]->revision_timestamp->value, 'short'); |
121 $this->assertRaw($nodes[1]->link($date) . ' by ' . $editor . '<p class="revision-log">' . $revision_log . '</p>'); | 121 $this->assertRaw($nodes[1]->toLink($date)->toString() . ' by ' . $editor . '<p class="revision-log">' . $revision_log . '</p>'); |
122 } | 122 } |
123 | 123 |
124 /** | 124 /** |
125 * Checks the Revisions tab. | 125 * Checks the Revisions tab. |
126 */ | 126 */ |