public function indexAction() { $user = $this->auth->getUser(); $error = false; if ($this->params()->fromPost('confirm')) { if ($this->dependencies->removeItems($user)) { $this->auth->clearIdentity(); $user->setStatus(Status::INACTIVE); return $this->redirect()->toRoute('lang'); } else { $error = true; } } return ['lists' => $this->dependencies->getLists(), 'user' => $user, 'limit' => 20, 'error' => $error]; }
/** * @covers ::__construct * @covers ::getLists */ public function testGetLists() { $return = []; $this->events->expects($this->once())->method('trigger')->with($this->equalTo(Manager::EVENT_GET_LISTS), $this->equalTo($this->manager))->willReturn($return); $this->assertSame($return, $this->manager->getLists()); }