public function testConvertTokensToMicrotime($delta, $tokens, Rate $rate) { $microtime = $this->getFunctionMock(__NAMESPACE__, "microtime"); $microtime->expects($this->any())->willReturn(100000); $converter = new TokenConverter($rate); $this->assertEquals(microtime(true) + $delta, $converter->convertTokensToMicrotime($tokens)); }