function MigrateUpgradeTestBase::assertEmailsSent

Same name in other branches
  1. 10 core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php \Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeTestBase::assertEmailsSent()
  2. 11.x core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php \Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeTestBase::assertEmailsSent()

Confirm emails were sent.

2 calls to MigrateUpgradeTestBase::assertEmailsSent()
Upgrade6Test::testUpgradeAndIncremental in core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php
Executes all steps of migrations upgrade.
Upgrade7Test::testUpgradeAndIncremental in core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php
Executes all steps of migrations upgrade.

File

core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php, line 363

Class

MigrateUpgradeTestBase
Provides a base class for testing migration upgrades in the UI.

Namespace

Drupal\Tests\migrate_drupal_ui\Functional

Code

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']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.