Esempio n. 1
0
 public static function createTestAclPermission()
 {
     $testData = self::$testData;
     $testData['resource'] = AclResourceTest::createTestAclResource();
     $testData['role'] = AclRoleTest::createTestAclRole();
     return new AclPermission($testData);
 }
Esempio n. 2
0
 public function testUpdate()
 {
     $testEntity = AclResourceTest::createTestAclResource();
     self::$entityManager->persist($testEntity);
     self::$entityManager->flush();
     $this->assertNotEquals('fubar', $testEntity->getName());
     $testEntity->setName('fubar');
     AclResourceService::update();
     $entities = self::$entityManager->createQuery('SELECT e FROM Rexmac\\Zyndax\\Entity\\AclResource e')->execute();
     $this->assertEquals('fubar', $entities[0]->getName());
 }