Beispiel #1
0
 public function testIsDatetimeString()
 {
     $this->assertTrue(Validate::isDatetimeString(\NObjects\Date::datetime()));
     $this->assertFalse(Validate::isDatetimeString(\NObjects\Date::toISO8601()));
     $this->assertFalse(Validate::isDatetimeString(time()));
     $this->assertFalse(Validate::isDatetimeString('Some date 10/10/2012'));
     $this->assertFalse(Validate::isDatetimeString(101));
 }
Beispiel #2
0
 public function testMilliseconds()
 {
     $this->assertEquals(round(microtime(true) * 1000), Date::milliseconds());
 }