toDestUnit() public method

Convert instance value to given unit.
public toDestUnit ( $time, $destUnit = null, $mode = null ) : integer
return integer
コード例 #1
0
ファイル: TimeUnitTest.php プロジェクト: Remo/phpbench
 /**
  * It should convert one time unit to another in throughput mode.
  *
  * @dataProvider provideConvertThroughput
  */
 public function testConvertThroughput($time, $unit, $destUnit, $expectedThroughput)
 {
     $unit = new TimeUnit($unit, $destUnit);
     $result = $unit->toDestUnit($time, null, TimeUnit::MODE_THROUGHPUT);
     $this->assertEquals($expectedThroughput, $result);
 }