public function testModCheckinTime()
 {
     $cmapper = new CheckinLogMapper(self::$pdo);
     $log = getLogInstance();
     $cmapper->insert($log);
     $log->checkin_time = date('Y-m-d H:i:s');
     $cmapper->changeCheckinTime($log);
     $newLog = $cmapper->find($log->checkin_id);
     $this->assertEquals($newLog->checkin_time, $log->checkin_time);
 }
Exemplo n.º 2
0
 public function testUserByDate()
 {
     $cmapper = new CheckinLogMapper(self::$pdo);
     $dbfacade = DBFacade::I(self::$pdo);
     $log = getLogInstance();
     $cmapper->insert($log);
     $newLogs = $dbfacade->findUserByDate(date('Y-m-d'));
     // echo 'log: ';
     // var_dump( $log);
     // echo 'new log: ';
     // var_dump($newLogs);
     // echo 'date: '. $newLogs[0]['checkin_time'];
     $this->assertEquals($log->checkin_time, $newLogs[0]['checkin_time']);
 }