public function testCalculateReceiptWaitEnd() { $stomp = new Client('http://127.0.0.1/'); $stomp->setReceiptWait(2.9); $calculateWaitEnd = new ReflectionMethod($stomp, 'calculateReceiptWaitEnd'); $calculateWaitEnd->setAccessible(true); $now = microtime(true); $result = $calculateWaitEnd->invoke($stomp); $this->assertGreaterThan($now, $result, 'Wait end should be in future.'); $resultDiff = round($result - $now, 1); $this->assertGreaterThanOrEqual($resultDiff, 2.9, 'Wait diff should be greater than /equal to 2.9.'); }