Beispiel #1
0
 /**
  * Test timingCurrentToRegistry().
  */
 public function testtimingCurrentToRegistry()
 {
     $this->object->timingStart('test');
     try {
         // Linux
         $black_hole = fopen('/dev/null', 'w');
     } catch (Exception $e) {
         // Windows
         $black_hole = fopen('null', 'w');
     }
     for ($i = 0; $i < 500; $i++) {
         fputs($black_hole, $i);
     }
     $this->object->timingStop('test');
     $current = $this->object->timingCurrentToRegistry('test');
     $this->assertInternalType('float', $current);
     $this->assertTrue($current > 0);
 }