Example #1
0
 public function Test_of_getBottomItem_2()
 {
     $TodoItems = new TodoItem('task->', 'Email Hilario with new product specs', 'due_time->', Ak::getDate(Ak::time() + 60 * 60 * 24 * 7));
     $this->assertPattern('/list/', $TodoItems->actsLike());
     $this->assertTrue($TodoItems->isNewRecord());
     $this->assertTrue($TodoItems->save());
     $this->assertTrue($getBottomItem = $TodoItems->List->getBottomItem());
     $this->assertEqual($getBottomItem->toString(), $TodoItems->toString());
     $TodoItems = new TodoItem('task->', 'Book COMDEX trip', 'due_time->', Ak::getDate(Ak::time() + 60 * 60 * 24 * 3));
     $this->assertTrue($TodoItems->isNewRecord());
     $this->assertTrue($TodoItems->save());
     $this->assertTrue($getBottomItem = $TodoItems->List->getBottomItem());
     $this->assertEqual($getBottomItem->toString(), $TodoItems->toString());
     $TodoItems = new TodoItem(1);
     $this->assertTrue($getBottomItem = $TodoItems->List->getBottomItem(2));
     $this->assertEqual($getBottomItem->toString(), $TodoItems->toString());
 }