public function testGetInputFilter()
 {
     $this->assertTrue($this->phoneNumber->getInputFilter() instanceof InputFilter);
 }
 /**
  * @param  PhoneNumber $phoneNumber
  * @return Person
  */
 public function addPhoneNumber(PhoneNumber $phoneNumber)
 {
     $phoneNumber->setPerson($this);
     $this->phoneNumbers->add($phoneNumber);
     return $this;
 }
 public function testPhoneNumberFunctions()
 {
     $this->person->clearPhoneNumbers();
     $this->assertEmpty($this->person->getPhoneNumbers()->toArray());
     $homePhone = new PhoneNumber();
     $homePhone->setType('home')->setPhoneNumber('12345678900');
     $workPhone = new PhoneNumber();
     $workPhone->setType('work')->setPhoneNumber('12345678912');
     $this->person->addPhoneNumber($homePhone);
     $this->person->addPhoneNumber($workPhone);
     $phoneCollection = $this->person->getPhoneNumbers();
     $this->assertTrue($phoneCollection->contains($homePhone));
     $this->assertTrue($phoneCollection->contains($workPhone));
     $this->person->setPhoneNumbers($phoneCollection);
     $this->assertEquals($phoneCollection, $this->person->getPhoneNumbers());
 }