コード例 #1
0
ファイル: OrganizationTest.php プロジェクト: emma5021/toba
 /**
  * Tests Organization->setAddress()
  */
 public function testSetAddress()
 {
     $this->Organization->setAddress('address');
     $this->assertEquals('address', $this->Organization->address);
 }
コード例 #2
0
 /**
  * Convert FB Jobs into OS array of Organizations.
  * 
  * @param Person $rawOSPerson
  */
 private static function enforceJobsArray(Person &$rawOSPerson)
 {
     $arryJobs = $rawOSPerson->getJobs();
     if (is_null($arryJobs)) {
         return;
     }
     $organizations = array();
     foreach ($arryJobs as $job) {
         $org = new Organization();
         $jobLocation = $job['location'];
         $org->setAddress($jobLocation['city'] . "," . $jobLocation['state'] . " " . $jobLocation['country']);
         $org->setDescription($job['description']);
         $org->setStartDate($job['start_date']);
         $org->setEndDate($job['end_date']);
         $org->setName($job['company_name']);
         $org->setTitle($job['position']);
         $organizations[] = $org;
     }
     $rawOSPerson->setJobs($organizations);
 }