You are here

protected function SendAccountEmailTest::setUp in Rules 8.3

Overrides RulesEntityIntegrationTestBase::setUp

File

tests/src/Unit/Integration/RulesAction/SendAccountEmailTest.php, line 31

Class

SendAccountEmailTest
@coversDefaultClass \Drupal\rules\Plugin\RulesAction\SendAccountEmail @group RulesAction

Namespace

Drupal\Tests\rules\Unit\Integration\RulesAction

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->enableModule('user');

  // Mock the logger.factory service, make it return the Rules logger
  // channel, and register it in the container.
  $this->logger = $this
    ->prophesize(LoggerChannelInterface::class);
  $logger_factory = $this
    ->prophesize(LoggerChannelFactoryInterface::class);
  $logger_factory
    ->get('rules')
    ->willReturn($this->logger
    ->reveal());
  $this->container
    ->set('logger.factory', $logger_factory
    ->reveal());
  $this->action = $this->actionManager
    ->createInstance('rules_send_account_email');
}