Example #1
0
 /**
  * check that our applicant is valid or throw our exception
  *
  * @param Applicant $applicant
  */
 private function validateApplicant(Applicant $applicant)
 {
     if (!$applicant->isValid()) {
         throw new InvalidApplicantException("Applicant is missing a required field");
     }
 }
Example #2
0
 /**
  * clean up and move users to a stage where they become archived in test env
  */
 public static function tearDownAfterClass()
 {
     $client = new Client(self::PLAYBOOK_USER, self::PLAYBOOK_TOKEN);
     foreach (self::$fakeApplicants as $v) {
         $applicant = new Applicant($v, $client);
         $applicant->status = 'deleted';
         $applicant->save();
     }
 }
 /**
  * @dataProvider applicantProvider
  */
 public function testCreateNoClient($name, $email, $zip)
 {
     $applicant = new Applicant(["name" => $name, 'email' => $email, "address_zip" => $zip]);
     $this->assertEquals(false, $applicant->create());
 }