private function getUser()
 {
     $date = new \DateTime();
     $date->setDate(1980, 1, 1);
     $user = new Person();
     $user->setSalutation(PERSON::SALUTATIONMALE)->setName($this->faker->name)->setSurname($this->faker->name)->setDateOfBirth($date)->setEmail($this->faker->email)->setPhoneNumber('03452696645')->setFaxNumber('03452696645');
     return $user;
 }
Пример #2
0
 private function getPerson()
 {
     $person = new Person();
     $person->setSalutation(Person::SALUTATIONMALE)->setName($this->faker->name)->setSurname($this->faker->name)->setDateOfBirth(new \DateTime())->setEmail($this->faker->email)->setPhoneNumber('555666')->setFaxNumber('555454');
     return $person;
 }
Пример #3
0
 public function testPersonTestValidationFaxNumberFailure()
 {
     $validation = new Validation();
     /**
      * Test length
      */
     $person = new Person();
     $person->setSalutation(PERSON::SALUTATIONFEMALE)->setName($this->faker->name)->setSurname($this->faker->name)->setEmail($this->faker->email)->setDateOfBirth(new \DateTime())->setFaxNumber('1234567890123456789012345678901234567890111');
     $validation->getValidator($person);
     $data = $validation->performValidation();
     $this->assertValidationReturned('Upg\\Library\\Request\\Objects\\Person', 'faxNumber', 'Fax Number must be less than 30 characters', $data, "Fax Number must be less than 30 characters validation failed");
 }