Esempio n. 1
0
 public function testCreateATaskEntity()
 {
     $tasks = array(array('id' => 1, 'name' => 'Get Milk', 'description' => '1 bag of skim milk', 'complete' => false), array('id' => 2, 'name' => 'Pay Cellphone Bill', 'description' => '$ 80.77', 'complete' => true));
     foreach ($tasks as $task) {
         $entity = new Task($task['id']);
         $entity->setName($task['name']);
         $entity->setDescription($task['description']);
         $entity->setComplete($task['complete']);
         $this->assertEquals($task['id'], $entity->getId());
         $this->assertEquals($task['name'], $entity->getName());
         $this->assertEquals($task['description'], $entity->getDescription());
         $this->assertEquals($task['complete'], $entity->isComplete());
     }
 }