/** * @param Batchblue_Service_BatchBook_Deal $deal * @return Batchblue_Service_BatchBook_Deal */ public function testAddPersonToToDo() { $person = new Batchblue_Service_BatchBook_Person(); $person->setFirstName('TestFirstNameWithToDo')->setLastName('TestLastNameWithToDo')->setNotes('Downloaded my product and linking todo'); $todo = new Batchblue_Service_BatchBook_ToDo(); $todo->setTitle('Test ToDo Title with person')->setDescription('Test ToDo Description with contact attached')->setFlagged(false)->setDueDate(new DateTime('2013-12-13')); $this->_toDoService->postToDo($todo); $this->_personService->postPerson($person); $this->_toDoService->addPersonToToDo($todo, $person); $getTodo = $this->_toDoService->getToDo($todo->getId()); $this->assertEquals($todo, $getTodo); return $todo; }
/** * @depends testPutToDo * @param Batchblue_Service_BatchBook_ToDo $toDo * @return void */ public function testDeleteToDo(Batchblue_Service_BatchBook_ToDo $toDo) { $this->_toDoService->deleteToDo($toDo); $getToDo = $this->_toDoService->getToDo($toDo->getId()); $this->assertNull($getToDo); }