public function testUserOwnership()
 {
     $metadata = new OwnershipMetadata('USER', 'usr', 'user_id');
     $this->assertTrue($metadata->hasOwner());
     $this->assertFalse($metadata->isOrganizationOwned());
     $this->assertFalse($metadata->isBusinessUnitOwned());
     $this->assertTrue($metadata->isUserOwned());
     $this->assertEquals('usr', $metadata->getOwnerFieldName());
     $this->assertEquals('user_id', $metadata->getOwnerColumnName());
 }
Esempio n. 2
0
 public function testUserOwnership()
 {
     $metadata = new OwnershipMetadata('USER', 'usr', 'user_id');
     $this->assertEquals(OwnershipMetadata::OWNER_TYPE_USER, $metadata->getOwnerType());
     $this->assertTrue($metadata->hasOwner());
     $this->assertFalse($metadata->isGlobalLevelOwned());
     $this->assertFalse($metadata->isLocalLevelOwned());
     $this->assertTrue($metadata->isBasicLevelOwned());
     $this->assertFalse($metadata->isOrganizationOwned());
     $this->assertFalse($metadata->isBusinessUnitOwned());
     $this->assertTrue($metadata->isUserOwned());
     $this->assertEquals('usr', $metadata->getOwnerFieldName());
     $this->assertEquals('user_id', $metadata->getOwnerColumnName());
 }