Commit 989b45dc authored by Neslee Canil Pinto's avatar Neslee Canil Pinto Committed by Neslee Canil Pinto
Browse files

Issue #3285956 by Project Update Bot, Neslee Canil Pinto: Automated Drupal 10 compatibility fixes

parent 7bf28f83
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
name: 'Add Another'
description: 'Presents users with an option to create another node of the same type after a node is added.'
type: module
core_version_requirement: ^8 || ^9
core_version_requirement: ^8 || ^9 || ^10
package: User interface
configure: addanother.admin_config
dependencies:
+1 −1
Original line number Diff line number Diff line
@@ -16,6 +16,6 @@
    "source": "https://git.drupalcode.org/project/addanother"
  },
  "require": {
    "drupal/core": "^8 || ^9"
    "drupal/core": "^8 || ^9 || ^10"
  }
}
+11 −5
Original line number Diff line number Diff line
@@ -63,12 +63,18 @@ class AddAnotherTest extends BrowserTestBase {
    $this->submitForm($edit, 'Save');

    // Check that the node has been created.
    $this->assertText(t('@post @title has been created.', [
    // TODO: Drupal Rector Notice: Please delete the following comment after you've made any necessary changes.
    // Verify the assertion: pageTextContains() for HTML responses, responseContains() for non-HTML responses.
    // The passed text should be HTML decoded, exactly as a human sees it in the browser.
    $this->assertSession()->pageTextContains(t('@post @title has been created.', [
      '@post' => $node_type,
      '@title' => $edit['title[0][value]'],
    ]), 'Node created.');
    $this->assertText(t('You may add another @type.', ['@type' => $node_type]), 'Addanother message was presented.');
    $this->assertLink('Add another');
    ]));
    // TODO: Drupal Rector Notice: Please delete the following comment after you've made any necessary changes.
    // Verify the assertion: pageTextContains() for HTML responses, responseContains() for non-HTML responses.
    // The passed text should be HTML decoded, exactly as a human sees it in the browser.
    $this->assertSession()->pageTextContains(t('You may add another @type.', ['@type' => $node_type]));
    $this->assertSession()->linkExists('Add another');

    // Create a node.
    $edit = [];
@@ -78,7 +84,7 @@ class AddAnotherTest extends BrowserTestBase {
    $this->submitForm($edit, 'Save and add another');

    // Check that the node has been created.
    $this->assertUrl("node/add/$node_type");
    $this->assertSession()->addressEquals("node/add/$node_type");
  }

}