public function test_ShouldCallReset() { $timeMock = $this->getMock(TimeIntervalInterface::class); $timeMock->expects($this->once())->method("reset"); /** @var TimeIntervalInterface $timeMock */ $rp = new RotatingProxy("test", null, -1, -1, $timeMock); $rp->skipWaitingTime(); }