use Drupal\comment\Tests\CommentTestTrait;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
+use Drupal\Tests\diff\Functional\CoreVersionUiTestTrait;
/**
* Tests the Diff module plugins.
class DiffPluginTest extends DiffPluginTestBase {
use CommentTestTrait;
+ use CoreVersionUiTestTrait;
/**
* Modules to enable.
// Update the article and add a new revision, the "changed" field should be
// updated which does not have plugins provided by diff.
- $edit = array(
+ $edit = [
'revision' => TRUE,
- );
- $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
+ 'body[0][value]' => 'change',
+ ];
+ $this->drupalPostNodeForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
// Check the difference between the last two revisions.
$this->clickLink(t('Revisions'));
'test_field_non_applicable[0][value]' => 'nicer_not_applicable',
'revision' => TRUE,
];
- $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
+ $this->drupalPostNodeForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
// Check differences between revisions.
$this->clickLink(t('Revisions'));
'body[0][value]' => '<p>body</p>
',
];
- $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
-
- // Assert the revision summary.
- $this->drupalGet('node/' . $node->id() . '/revisions');
- $this->assertText('Changes on: Body');
+ $this->drupalPostNodeForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
// Assert the revision comparison.
+ $this->drupalGet('node/' . $node->id() . '/revisions');
$this->drupalPostForm(NULL, [], t('Compare selected revisions'));
$this->assertNoText('No visible changes.');
$rows = $this->xpath('//tbody/tr');
<p>body_new</p>
',
];
- $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
+ $this->drupalPostNodeForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
$this->drupalGet('node/' . $node->id() . '/revisions');
$this->drupalPostForm(NULL, [], t('Compare selected revisions'));
$this->assertNoText('No visible changes.');