Ejemplo n.º 1
0
 /**
  * @dataProvider adaptRootMaskProvider
  */
 public function testAdaptRootMask($object, $ownerType, $aceMask, $expectedMask)
 {
     if ($ownerType !== null) {
         $this->metadataProvider->setMetadata('Oro\\Bundle\\SecurityBundle\\Tests\\Unit\\Acl\\Domain\\Fixtures\\Entity\\TestEntity', new OwnershipMetadata($ownerType, 'owner', 'owner_id'));
     }
     $resultMask = $this->extension->adaptRootMask($aceMask, $object);
     $this->assertEquals($expectedMask, $resultMask, sprintf('Expected "%s" -> "%s"; Actual: "%s"', $this->extension->getMaskPattern($aceMask), $this->extension->getMaskPattern($expectedMask), $this->extension->getMaskPattern($resultMask)));
 }