public function testGetRoles() { $this->tester->impersonate('*****@*****.**'); $auth = $this->sm->get('ZfcRbac\\Service\\AuthorizationService'); $i = $auth->getIdentity()->getRoles(); $this->assertTrue($auth->isGranted('Drzava-list')); }
/** * Test normalnega poganjanja job-a * @depends testCreateJob * @param \UnitTester $I */ public function testRunJob(\UnitTester $I) { $I->impersonate(); $data = array('podatek' => 'OK'); $metadata = array('name' => 'Testni job 123', 'task' => '\\TestAssets\\Task\\DummyTestTask', 'data' => $data, 'sync' => true); $jm = $this->getJobManager($I); $this->job = $job = $jm->createJob($metadata); $I->assertTrue($job instanceof \Jobs\Entity\Job); }