function EntityPathAliasCreateTest::setUp

Overrides RulesEntityIntegrationTestBase::setUp

File

tests/src/Unit/Integration/RulesAction/EntityPathAliasCreateTest.php, line 35

Class

EntityPathAliasCreateTest
@coversDefaultClass \Drupal\rules\Plugin\RulesAction\EntityPathAliasCreate @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());
    // Instantiate the action we are testing.
    $this->action = $this->actionManager
        ->createInstance('rules_entity_path_alias_create:entity:test');
}