/** * Tests the action execution. * * @covers ::execute */ public function testActionExecution() { $alias = 'about/team'; $this->aliasStorage->delete(['alias' => $alias])->shouldBeCalledTimes(1); $this->action->setContextValue('alias', $alias); $this->action->execute(); }
/** * Tests the action execution. * * @covers ::execute */ public function testActionExecution() { $path = 'node/1'; $this->aliasStorage->delete(['path' => $path])->shouldBeCalledTimes(1); $this->action->setContextValue('path', $path); $this->action->execute(); }
/** * Test execute() method for blocked and anonymous users. * * @covers ::execute */ public function testBlockUserWithBlockedAnonymousUser() { $user = $this->getUserMock(self::BLOCKED, self::ANONYMOUS); $user->block()->shouldNotBeCalled(); $this->sessionManager->delete()->shouldNotBeCalled(); $this->action->setContextValue('user', $user->reveal()); $this->action->execute(); $this->assertEquals($this->action->autoSaveContext(), [], 'Action returns nothing for auto saving since the user has not been altered.'); }