예제 #1
0
 public function testGetAccessLevelNamesForRoot()
 {
     $object = new ObjectIdentity('entity', ObjectIdentityFactory::ROOT_IDENTITY_TYPE);
     $this->assertEquals([0 => 'NONE', 1 => 'BASIC', 2 => 'LOCAL', 3 => 'DEEP', 5 => 'SYSTEM'], $this->extension->getAccessLevelNames($object));
 }
예제 #2
0
 /**
  * @param OwnershipMetadata $metadata
  * @param array $expected
  *
  * @dataProvider accessLevelProvider
  */
 public function testGetAccessLevelNamesForNonRoot(OwnershipMetadata $metadata, array $expected)
 {
     $object = new ObjectIdentity('entity', '\\stdClass');
     $this->metadataProvider->setMetadata('\\stdClass', $metadata);
     $this->assertEquals($expected, $this->extension->getAccessLevelNames($object));
 }
 public function testGetAccessLevelNamesForRoot()
 {
     $object = new ObjectIdentity('entity', ObjectIdentityFactory::ROOT_IDENTITY_TYPE);
     $this->assertEquals(array('NONE', 'BASIC', 'LOCAL', 'DEEP', 'GLOBAL', 'SYSTEM'), $this->extension->getAccessLevelNames($object));
 }