You are here

protected function PathHasAliasTest::setUp in Rules 8.3

Overrides RulesIntegrationTestBase::setUp

File

tests/src/Unit/Integration/Condition/PathHasAliasTest.php, line 37

Class

PathHasAliasTest
@coversDefaultClass \Drupal\rules\Plugin\Condition\PathHasAlias @group RulesCondition

Namespace

Drupal\Tests\rules\Unit\Integration\Condition

Code

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

  // Must enable the path_alias module.
  $this
    ->enableModule('path_alias');
  $this->aliasManager = $this
    ->prophesize(AliasManagerInterface::class);
  $this->container
    ->set('path_alias.manager', $this->aliasManager
    ->reveal());
  $this->condition = $this->conditionManager
    ->createInstance('rules_path_has_alias');
  $this->englishLanguage = $this
    ->prophesize(LanguageInterface::class);
  $this->englishLanguage
    ->getId()
    ->willReturn('en');
}