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()); }
/** * 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()]); }