function PathAliasDeleteByAliasTest::testActionExecution
Tests the action execution.
@covers ::execute
File
-
tests/
src/ Unit/ Integration/ RulesAction/ PathAliasDeleteByAliasTest.php, line 58
Class
- PathAliasDeleteByAliasTest
- @coversDefaultClass \Drupal\rules\Plugin\RulesAction\PathAliasDeleteByAlias @group RulesAction
Namespace
Drupal\Tests\rules\Unit\Integration\RulesActionCode
public function testActionExecution() {
$alias = '/about/team';
$this->action
->setContextValue('alias', $alias);
$path_alias = $this->prophesizeEntity(PathAliasInterface::class);
$this->aliasStorage
->delete([
$path_alias->reveal(),
])
->shouldBeCalledTimes(1);
$this->aliasStorage
->loadByProperties([
'alias' => $alias,
])
->willReturn([
$path_alias->reveal(),
])
->shouldBeCalledTimes(1);
$this->action
->execute();
}