Ejemplo n.º 1
0
 /**
  * Test getting the current time.
  * Asserting that this call equals time() would make the test very brittle.
  * This is why we only check against the return type here.
  */
 public function testCurrent()
 {
     $testTime = new SystemTime();
     $currentTime = $testTime->current();
     $this->assertInternalType('int', $currentTime);
     $this->assertGreaterThan(0, $currentTime);
 }
Ejemplo n.º 2
0
 public function current()
 {
     $this->updateQueue();
     if (isset($this->permanentCurrent)) {
         return $this->permanentCurrent;
     }
     if (isset($this->upcomingCurrent)) {
         return $this->upcomingCurrent;
     }
     return parent::current();
 }