You are here

protected function PathAliasCreateTest::setUp in Rules 8.3

Overrides RulesEntityIntegrationTestBase::setUp

File

tests/src/Unit/Integration/RulesAction/PathAliasCreateTest.php, line 33

Class

PathAliasCreateTest
@coversDefaultClass \Drupal\rules\Plugin\RulesAction\PathAliasCreate @group RulesAction

Namespace

Drupal\Tests\rules\Unit\Integration\RulesAction

Code

protected function setUp() : void {
  parent::setUp();

  // Must enable the path_alias module.
  $this
    ->enableModule('path_alias');

  // Prepare mocked EntityStorageInterface.
  $this->aliasStorage = $this
    ->prophesize(EntityStorageInterface::class);
  $this->entityTypeManager
    ->getStorage('path_alias')
    ->willReturn($this->aliasStorage
    ->reveal());
  $this->action = $this->actionManager
    ->createInstance('rules_path_alias_create');
}