/** * @covers ::__construct * @covers ::getCallback * @covers ::getTimeout * @covers ::getStep * @covers ::getTries * @covers ::getCurrent * @covers ::hasTriesLeft */ public function testConstruct() { $callback = function () { return true; }; $attempt = new Attempt($callback); $this->assertSame($callback, $attempt->getCallback()); $this->assertSame(2000, $attempt->getTimeout()); $this->assertSame(50, $attempt->getStep()); $this->assertSame(40, $attempt->getTries()); $this->assertSame(0, $attempt->getCurrent()); $this->assertSame(true, $attempt->hasTriesLeft()); }