Loading core/lib/Drupal/Core/Test/RefreshVariablesTrait.php +1 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ trait RefreshVariablesTrait { * Useful after a page request is made that changes configuration or state in * a different thread. * * In other words calling a settings page with $this->drupalPostForm() with a * In other words calling a settings page with $this->submitForm() with a * changed value would update configuration to reflect that change, but in the * thread that made the call (thread running the test) the changed values * would not be picked up. Loading core/modules/action/tests/src/Functional/ConfigurationTest.php +4 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,8 @@ public function testActionConfiguration() { // Make a POST request to admin/config/system/actions. $edit = []; $edit['action'] = 'action_goto_action'; $this->drupalPostForm('admin/config/system/actions', $edit, 'Create'); $this->drupalGet('admin/config/system/actions'); $this->submitForm($edit, 'Create'); $this->assertSession()->statusCodeEquals(200); // Make a POST request to the individual action configuration page. Loading @@ -46,7 +47,8 @@ public function testActionConfiguration() { $edit['label'] = $action_label; $edit['id'] = strtolower($action_label); $edit['url'] = 'admin'; $this->drupalPostForm('admin/config/system/actions/add/action_goto_action', $edit, 'Save'); $this->drupalGet('admin/config/system/actions/add/action_goto_action'); $this->submitForm($edit, 'Save'); $this->assertSession()->statusCodeEquals(200); $action_id = $edit['id']; Loading core/modules/aggregator/tests/src/Functional/AddFeedTest.php +2 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,8 @@ public function testAddFeed() { 'url[0][value]' => $feed->getUrl(), 'refresh' => '900', ]; $this->drupalPostForm('aggregator/sources/add', $edit, 'Save'); $this->drupalGet('aggregator/sources/add'); $this->submitForm($edit, 'Save'); $this->assertRaw(t('A feed named %feed already exists. Enter a unique title.', ['%feed' => $feed->label()])); $this->assertRaw(t('A feed with this URL %url already exists. Enter a unique URL.', ['%url' => $feed->getUrl()])); Loading core/modules/aggregator/tests/src/Functional/AggregatorAdminTest.php +4 −2 Original line number Diff line number Diff line Loading @@ -36,7 +36,8 @@ public function testSettingsPage() { 'aggregator_parser' => 'aggregator_test_parser', 'aggregator_processors[aggregator_test_processor]' => 'aggregator_test_processor', ]; $this->drupalPostForm('admin/config/services/aggregator/settings', $edit, 'Save configuration'); $this->drupalGet('admin/config/services/aggregator/settings'); $this->submitForm($edit, 'Save configuration'); $this->assertSession()->pageTextContains('The configuration options have been saved.'); // Check that settings have the correct default value. Loading @@ -50,7 +51,8 @@ public function testSettingsPage() { $edit = [ 'dummy_length' => 100, ]; $this->drupalPostForm('admin/config/services/aggregator/settings', $edit, 'Save configuration'); $this->drupalGet('admin/config/services/aggregator/settings'); $this->submitForm($edit, 'Save configuration'); $this->assertSession()->pageTextContains('The configuration options have been saved.'); $this->assertSession()->fieldValueEquals('dummy_length', 100); Loading core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php +8 −4 Original line number Diff line number Diff line Loading @@ -74,7 +74,8 @@ protected function setUp() { */ public function createFeed($feed_url = NULL, array $edit = []) { $edit = $this->getFeedEditArray($feed_url, $edit); $this->drupalPostForm('aggregator/sources/add', $edit, 'Save'); $this->drupalGet('aggregator/sources/add'); $this->submitForm($edit, 'Save'); $this->assertSession()->pageTextContains('The feed ' . $edit['title[0][value]'] . ' has been added.'); // Verify that the creation message contains a link to a feed. Loading @@ -96,7 +97,8 @@ public function createFeed($feed_url = NULL, array $edit = []) { * Feed object representing the feed. */ public function deleteFeed(FeedInterface $feed) { $this->drupalPostForm('aggregator/sources/' . $feed->id() . '/delete', [], 'Delete'); $this->drupalGet('aggregator/sources/' . $feed->id() . '/delete'); $this->submitForm([], 'Delete'); $this->assertRaw(t('The feed %title has been deleted.', ['%title' => $feed->label()])); } Loading Loading @@ -219,7 +221,8 @@ public function updateFeedItems(FeedInterface $feed, $expected_count = NULL) { * Feed object representing the feed. */ public function deleteFeedItems(FeedInterface $feed) { $this->drupalPostForm('admin/config/services/aggregator/delete/' . $feed->id(), [], 'Delete items'); $this->drupalGet('admin/config/services/aggregator/delete/' . $feed->id()); $this->submitForm([], 'Delete items'); $this->assertRaw(t('The news items from %title have been deleted.', ['%title' => $feed->label()])); } Loading Loading @@ -391,7 +394,8 @@ public function createSampleNodes($count = 5) { $edit = []; $edit['title[0][value]'] = $this->randomMachineName(); $edit['body[0][value]'] = $this->randomMachineName(); $this->drupalPostForm('node/add/article', $edit, 'Save'); $this->drupalGet('node/add/article'); $this->submitForm($edit, 'Save'); } } Loading Loading
core/lib/Drupal/Core/Test/RefreshVariablesTrait.php +1 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ trait RefreshVariablesTrait { * Useful after a page request is made that changes configuration or state in * a different thread. * * In other words calling a settings page with $this->drupalPostForm() with a * In other words calling a settings page with $this->submitForm() with a * changed value would update configuration to reflect that change, but in the * thread that made the call (thread running the test) the changed values * would not be picked up. Loading
core/modules/action/tests/src/Functional/ConfigurationTest.php +4 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,8 @@ public function testActionConfiguration() { // Make a POST request to admin/config/system/actions. $edit = []; $edit['action'] = 'action_goto_action'; $this->drupalPostForm('admin/config/system/actions', $edit, 'Create'); $this->drupalGet('admin/config/system/actions'); $this->submitForm($edit, 'Create'); $this->assertSession()->statusCodeEquals(200); // Make a POST request to the individual action configuration page. Loading @@ -46,7 +47,8 @@ public function testActionConfiguration() { $edit['label'] = $action_label; $edit['id'] = strtolower($action_label); $edit['url'] = 'admin'; $this->drupalPostForm('admin/config/system/actions/add/action_goto_action', $edit, 'Save'); $this->drupalGet('admin/config/system/actions/add/action_goto_action'); $this->submitForm($edit, 'Save'); $this->assertSession()->statusCodeEquals(200); $action_id = $edit['id']; Loading
core/modules/aggregator/tests/src/Functional/AddFeedTest.php +2 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,8 @@ public function testAddFeed() { 'url[0][value]' => $feed->getUrl(), 'refresh' => '900', ]; $this->drupalPostForm('aggregator/sources/add', $edit, 'Save'); $this->drupalGet('aggregator/sources/add'); $this->submitForm($edit, 'Save'); $this->assertRaw(t('A feed named %feed already exists. Enter a unique title.', ['%feed' => $feed->label()])); $this->assertRaw(t('A feed with this URL %url already exists. Enter a unique URL.', ['%url' => $feed->getUrl()])); Loading
core/modules/aggregator/tests/src/Functional/AggregatorAdminTest.php +4 −2 Original line number Diff line number Diff line Loading @@ -36,7 +36,8 @@ public function testSettingsPage() { 'aggregator_parser' => 'aggregator_test_parser', 'aggregator_processors[aggregator_test_processor]' => 'aggregator_test_processor', ]; $this->drupalPostForm('admin/config/services/aggregator/settings', $edit, 'Save configuration'); $this->drupalGet('admin/config/services/aggregator/settings'); $this->submitForm($edit, 'Save configuration'); $this->assertSession()->pageTextContains('The configuration options have been saved.'); // Check that settings have the correct default value. Loading @@ -50,7 +51,8 @@ public function testSettingsPage() { $edit = [ 'dummy_length' => 100, ]; $this->drupalPostForm('admin/config/services/aggregator/settings', $edit, 'Save configuration'); $this->drupalGet('admin/config/services/aggregator/settings'); $this->submitForm($edit, 'Save configuration'); $this->assertSession()->pageTextContains('The configuration options have been saved.'); $this->assertSession()->fieldValueEquals('dummy_length', 100); Loading
core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php +8 −4 Original line number Diff line number Diff line Loading @@ -74,7 +74,8 @@ protected function setUp() { */ public function createFeed($feed_url = NULL, array $edit = []) { $edit = $this->getFeedEditArray($feed_url, $edit); $this->drupalPostForm('aggregator/sources/add', $edit, 'Save'); $this->drupalGet('aggregator/sources/add'); $this->submitForm($edit, 'Save'); $this->assertSession()->pageTextContains('The feed ' . $edit['title[0][value]'] . ' has been added.'); // Verify that the creation message contains a link to a feed. Loading @@ -96,7 +97,8 @@ public function createFeed($feed_url = NULL, array $edit = []) { * Feed object representing the feed. */ public function deleteFeed(FeedInterface $feed) { $this->drupalPostForm('aggregator/sources/' . $feed->id() . '/delete', [], 'Delete'); $this->drupalGet('aggregator/sources/' . $feed->id() . '/delete'); $this->submitForm([], 'Delete'); $this->assertRaw(t('The feed %title has been deleted.', ['%title' => $feed->label()])); } Loading Loading @@ -219,7 +221,8 @@ public function updateFeedItems(FeedInterface $feed, $expected_count = NULL) { * Feed object representing the feed. */ public function deleteFeedItems(FeedInterface $feed) { $this->drupalPostForm('admin/config/services/aggregator/delete/' . $feed->id(), [], 'Delete items'); $this->drupalGet('admin/config/services/aggregator/delete/' . $feed->id()); $this->submitForm([], 'Delete items'); $this->assertRaw(t('The news items from %title have been deleted.', ['%title' => $feed->label()])); } Loading Loading @@ -391,7 +394,8 @@ public function createSampleNodes($count = 5) { $edit = []; $edit['title[0][value]'] = $this->randomMachineName(); $edit['body[0][value]'] = $this->randomMachineName(); $this->drupalPostForm('node/add/article', $edit, 'Save'); $this->drupalGet('node/add/article'); $this->submitForm($edit, 'Save'); } } Loading