/** * @depends testGetPerson * @param Batchblue_Service_BatchBook_Person $person * @return Batchblue_Service_BatchBook_Person */ public function testPutPerson(Batchblue_Service_BatchBook_Person $person) { $location = new Batchblue_Service_BatchBook_Location(); $location->setEmail(md5(uniqid(rand(), true)) . '*****@*****.**')->setPhone('123-123-9999'); $locations = array($location); $person->setFirstName('TestFirstName')->setLastName('TestLastName')->setTitle('Developer')->setCompany('Test Company')->setNotes('Test notes go here')->setLocations($locations); $this->_personService->putPerson($person); $getPerson = $this->_personService->getPerson($person->getId()); //the id is in there when it comes back, so to make the test pass, put it in! $getLocations = $getPerson->getLocations(); $location->setId($getLocations[0]->getId()); $this->assertEquals($person, $getPerson); return $person; }