You are here

protected function MigrateUpgradeTestBase::assertEmailsSent in Drupal 10

Confirm emails were sent.

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