예제 #1
0
 public function testGetMinute()
 {
     $time = new Time(new Hour(20), new Minute(10), new Second(34));
     $minute = new Minute(10);
     $this->assertTrue($minute->sameValueAs($time->getMinute()));
 }
예제 #2
0
 /**
  * Returns current Time
  *
  * @return self
  */
 public static function now()
 {
     $time = new static(Hour::now(), Minute::now(), Second::now());
     return $time;
 }
예제 #3
0
 public function testNow()
 {
     $minute = Minute::now();
     $this->assertEquals(\intval(date('i')), $minute->toNative());
 }