/** * Nastavim vse potrebno, da lahko produciram repositorije * Repositorijem, ki to potrebujejo nastavim service locator */ protected function getJobManager(\UnitTester $I) { $this->jm = $I->grabServiceManager()->get('jobmanager.service'); return $this->jm; }
protected function setIdentity($name = 'console') { $authService = $this->tester->grabServiceManager()->get('Zend\\Authentication\\AuthenticationService'); $user = $this->tester->grabEntityManager()->getRepository('Aaa\\Entity\\User')->findOneByUsername($name); $authService->getStorage()->write($user); }