Esempio n. 1
0
 /**
  * As the fax number must be numeric the library will strip out any non numeric characters
  */
 public function testSetFaxNumber()
 {
     $person = new Person();
     $person->setFaxNumber($this->faker->phoneNumber);
     $this->assertNotEmpty($person->getFaxNumber(), "No phone number was set");
     $this->assertRegExp('/^\\d+$/', $person->getFaxNumber(), "Phone number contains non numeric characters");
     /**
      * Test strip out mechanism works
      */
     $person->setFaxNumber("555447B");
     $this->assertNotEmpty($person->getFaxNumber(), "No phone number was set");
     $this->assertRegExp('/^\\d+$/', $person->getFaxNumber(), "Phone number contains non numeric characters");
 }