diff --git a/src/Tests/InlineEntityFormRevisionTest.php b/src/Tests/InlineEntityFormRevisionTest.php index e0f69ea..02399f2 100644 --- a/src/Tests/InlineEntityFormRevisionTest.php +++ b/src/Tests/InlineEntityFormRevisionTest.php @@ -101,11 +101,11 @@ class InlineEntityFormRevisionTest extends InlineEntityFormTestBase { // Go to the edit page. $this->drupalGet($node_edit_url); -+ $this->drupalPostAjaxForm(NULL, [], $this->getButtonName('//input[@type="submit" and @value="Edit" and @data-drupal-selector="edit-field-entity-ref-revision-entities-0-actions-ief-entity-dit"]')); + $this->drupalPostAjaxForm(NULL, [], $this->getButtonName('//input[@type="submit" and @value="Edit" and @data-drupal-selector="edit-field-entity-ref-revision-entities-0-actions-ief-entity-dit"]')); // New content. $edit = [ -+ 'field_entity_ref_revision[form][inline_entity_form][entities][0][form][title][0][value]' => Some reference revision', + 'field_entity_ref_revision[form][inline_entity_form][entities][0][form][title][0][value]' => 'Some reference revision', ]; // New parent content. @@ -115,24 +115,24 @@ class InlineEntityFormRevisionTest extends InlineEntityFormTestBase { ]; // And I submit the inline form. -+ $this->drupalPostAjaxForm(NULL, $edit, $this->getButtonName('//input[@type="submit" and @value="Update node" and @data-drupal-selector="edit-field-entity-ref-revision-form-inline-entity-form-ntities-0-form-actions-ief-edit-save"]')); + $this->drupalPostAjaxForm(NULL, $edit, $this->getButtonName('//input[@type="submit" and @value="Update node" and @data-drupal-selector="edit-field-entity-ref-revision-form-inline-entity-form-ntities-0-form-actions-ief-edit-save"]')); $this->assertResponse(200, 'Creating node via inline form was successful.'); // And I submit the main form. $this->drupalPostForm(NULL, $parent_edit, t('Save')); // Then I should see a success message. -+ $this->assertText($parent_edit['title[0][value]'] . ' has been updated', 'Parent node title ound.'); + $this->assertText($parent_edit['title[0][value]'] . ' has been updated', 'Parent node title ound.'); // And load the node. $node_revision = $this->drupalGetNodeByTitle($parent_edit['title[0][value]'], TRUE); $this->assertTrue($node_revision, 'Node found in database.'); // Then the node should have 2 different revision id's. -+ $this->assertNotEqual($node->getRevisionId(), $node_revision->getRevisionId(), 'Node versions ave different revision ids.'); + $this->assertNotEqual($node->getRevisionId(), $node_revision->getRevisionId(), 'Node versions ave different revision ids.'); // Then the revision titles should be different. -+ $this->assertNotEqual($node->getTitle(), $node_revision->getTitle(), 'Node revisions have ifferent log messages.'); + $this->assertNotEqual($node->getTitle(), $node_revision->getTitle(), 'Node revisions have ifferent log messages.'); // Then the referenced items should have their revisions. $original_child = $node->get('field_entity_ref_revision'); @@ -140,8 +140,8 @@ class InlineEntityFormRevisionTest extends InlineEntityFormTestBase { // And they should not be equal. $this->assertNotEqual($original_child->get(0)->getValue(), $revision_child->get(0)->getValue()); -+ $this->assertEqual($original_child->get(0)->getValue()['target_id'], $revision_child->get(0)->etValue()['target_id']); -+ $this->assertTrue($original_child->get(0)->getValue()['target_revision_id'] < $revision_child->get0)->getValue()['target_revision_id']); + $this->assertEqual($original_child->get(0)->getValue()['target_id'], $revision_child->get(0)->etValue()['target_id']); + $this->assertTrue($original_child->get(0)->getValue()['target_revision_id'] < $revision_child->get(0)->getValue()['target_revision_id']); } /**