Example #1
0
 public function testGetRoles()
 {
     $this->tester->impersonate('*****@*****.**');
     $auth = $this->sm->get('ZfcRbac\\Service\\AuthorizationService');
     $i = $auth->getIdentity()->getRoles();
     $this->assertTrue($auth->isGranted('Drzava-list'));
 }
Example #2
0
 /**
  * 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);
 }