Loading core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php +13 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ public function doUpgradeAndIncremental() { // Test the review form. $this->assertReviewForm(); $this->useTestMailCollector(); $this->submitForm([], 'Perform upgrade'); $this->assertUpgrade($this->getEntityCounts()); Loading @@ -57,4 +58,16 @@ public function doUpgradeAndIncremental() { $this->assertUpgrade($this->getEntityCountsIncremental()); } /** * Helper to set the test mail collector in settings.php. */ public function useTestMailCollector() { // Set up an override. $settings['config']['system.mail']['interface']['default'] = (object) [ 'value' => 'test_mail_collector', 'required' => TRUE, ]; $this->writeSettings($settings); } } core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php +10 −0 Original line number Diff line number Diff line Loading @@ -357,4 +357,14 @@ protected function assertFileMigrations() { } } /** * Confirm emails were sent. */ protected function assertEmailsSent() { // There should be one user activation email. $captured_emails = \Drupal::state()->get('system.test_mail_collector', []); $this->assertCount(1, $captured_emails); $this->assertEquals('user_status_activated', $captured_emails[0]['id']); } } core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php +2 −0 Original line number Diff line number Diff line Loading @@ -206,6 +206,8 @@ public function testUpgradeAndIncremental() { $this->assertUserLogIn(2, 'john.doe_pass'); $this->assertFollowUpMigrationResults(); $this->assertEmailsSent(); } /** Loading core/modules/migrate_drupal_ui/tests/src/Functional/d7/DoubleSlashTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ public function testMigrateUpgradeExecute() { $this->submitForm([], 'Continue'); $this->submitForm($edits, 'Review upgrade'); $this->submitForm([], 'I acknowledge I may lose data. Continue anyway.'); $this->useTestMailCollector(); $this->submitForm([], 'Perform upgrade'); // Tests the migration log contains an error message. Loading core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php +2 −0 Original line number Diff line number Diff line Loading @@ -230,6 +230,8 @@ public function testUpgradeAndIncremental() { $this->assertUserLogIn(2, 'a password'); $this->assertFollowUpMigrationResults(); $this->assertEmailsSent(); } /** Loading Loading
core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php +13 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ public function doUpgradeAndIncremental() { // Test the review form. $this->assertReviewForm(); $this->useTestMailCollector(); $this->submitForm([], 'Perform upgrade'); $this->assertUpgrade($this->getEntityCounts()); Loading @@ -57,4 +58,16 @@ public function doUpgradeAndIncremental() { $this->assertUpgrade($this->getEntityCountsIncremental()); } /** * Helper to set the test mail collector in settings.php. */ public function useTestMailCollector() { // Set up an override. $settings['config']['system.mail']['interface']['default'] = (object) [ 'value' => 'test_mail_collector', 'required' => TRUE, ]; $this->writeSettings($settings); } }
core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php +10 −0 Original line number Diff line number Diff line Loading @@ -357,4 +357,14 @@ protected function assertFileMigrations() { } } /** * Confirm emails were sent. */ protected function assertEmailsSent() { // There should be one user activation email. $captured_emails = \Drupal::state()->get('system.test_mail_collector', []); $this->assertCount(1, $captured_emails); $this->assertEquals('user_status_activated', $captured_emails[0]['id']); } }
core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php +2 −0 Original line number Diff line number Diff line Loading @@ -206,6 +206,8 @@ public function testUpgradeAndIncremental() { $this->assertUserLogIn(2, 'john.doe_pass'); $this->assertFollowUpMigrationResults(); $this->assertEmailsSent(); } /** Loading
core/modules/migrate_drupal_ui/tests/src/Functional/d7/DoubleSlashTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ public function testMigrateUpgradeExecute() { $this->submitForm([], 'Continue'); $this->submitForm($edits, 'Review upgrade'); $this->submitForm([], 'I acknowledge I may lose data. Continue anyway.'); $this->useTestMailCollector(); $this->submitForm([], 'Perform upgrade'); // Tests the migration log contains an error message. Loading
core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php +2 −0 Original line number Diff line number Diff line Loading @@ -230,6 +230,8 @@ public function testUpgradeAndIncremental() { $this->assertUserLogIn(2, 'a password'); $this->assertFollowUpMigrationResults(); $this->assertEmailsSent(); } /** Loading