doTestRevisionDiffOverview(); $this->doTestOverviewPager(); $this->doTestRevisionOverviewErrorMessages(); $this->doTestEntityReference(); } /** * Tests the revision diff overview. */ protected function doTestRevisionDiffOverview() { $this->drupalPlaceBlock('system_breadcrumb_block'); // Login as admin with the required permission. $this->loginAsAdmin(['delete any article content']); // Create an article. $title = 'test_title_a'; $edit = array( 'title[0][value]' => $title, 'body[0][value]' => '

Revision 1

first_unique_text

second_unique_text

', ); $this->drupalPostForm('node/add/article', $edit, t('Save and publish')); $node = $this->drupalGetNodeByTitle($title); $created = $node->getCreatedTime(); $this->drupalGet('node/' . $node->id()); // Make sure the revision tab doesn't exist. $this->assertNoLink('Revisions'); // Create a second revision, with a revision comment. $this->drupalGet('node/add/article'); $edit = array( 'body[0][value]' => '

Revision 2

first_unique_text

second_unique_text

', 'revision' => TRUE, 'revision_log[0][value]' => 'Revision 2 comment', ); $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published')); $this->drupalGet('node/' . $node->id()); // Check the revisions overview. $this->clickLink(t('Revisions')); $rows = $this->xpath('//tbody/tr'); // Make sure only two revisions available. $this->assertEqual(count($rows), 2); // Assert the revision summary. $this->assertUniqueText('Revision 2 comment'); $this->assertText('Initial revision.'); // Compare the revisions in standard mode. $this->drupalPostForm(NULL, NULL, t('Compare selected revisions')); $this->clickLink('Split fields'); // Assert breadcrumbs are properly displayed. $this->assertRaw('