/** * Test branja metapodatkov iz anotacij taska * * */ public function testGetTaskMeta(\UnitTester $I) { $jobId = $this->job->getId(); $em = $I->grabEntityManager(); $em->clear(); $jm = $this->getJobManager($I); $job = $jm->find($jobId); $meta = $jm->getTaskMeta($job); $I->assertTrue($meta instanceof \Jobs\Annotation\Task\Meta); $I->assertEquals($meta->name, "dummy task"); $I->assertEquals($meta->acl, "test.acl.xx"); $em->remove($job); $em->flush(); $job = $jm->find($jobId); $I->assertEmpty($job); }
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); }