Ejemplo n.º 1
0
 public function testAddUserIsPersistentAndInList()
 {
     $this->address->addOwner($this->owner1);
     $address = $this->cloneAddress($this->address);
     $this->assertContains($this->owner1, $address->listOwners(true));
     $this->assertContains($this->owner1->getUsername(), $address->listOwners());
 }
Ejemplo n.º 2
0
 /**
  * Checks if a user is a owner of the address.
  * @param User $owner
  * @return bool
  */
 public function isOwner(User $owner)
 {
     $this->setUpOwners();
     return isset($this->owners[$owner->getUsername()]);
 }