public function testGetDateStringParsesTime()
 {
     $this->field->shouldReceive('getOption')->twice()->andReturn('time');
     $this->assertEquals($this->field->getDateString(strtotime('4:45pm')), '16:45:00');
 }
Exemplo n.º 2
0
 public function testGetDateStringParsesVeryOldDate()
 {
     $this->field->shouldReceive('getOption')->once()->andReturn('date');
     $this->assertEquals($this->field->getDateString(new \DateTime('6/20/1700')), '1700-06-20');
 }