Kraken\_Unit\Channel\Extra\RequestTest::testApiRetryOrReset_ResetsInRetryUsingTimer_WhenIntervalIsGreaterThanZero PHP Method

testApiRetryOrReset_ResetsInRetryUsingTimer_WhenIntervalIsGreaterThanZero() public method

    public function testApiRetryOrReset_ResetsInRetryUsingTimer_WhenIntervalIsGreaterThanZero()
    {
        $req = $this->createRequest($name = 'name', $mssg = 'secret', ['retriesInterval' => 1], ['send']);
        $ex = new Exception();
        $promise = new Promise();
        $req->expects($this->once())->method('send')->with($promise);
        $oldCounter = $this->getProtectedProperty($req, 'counter');
        $this->callProtectedMethod($req, 'retryOrReset', [$promise, $ex]);
        $newCounter = $this->getProtectedProperty($req, 'counter');
        $this->assertSame($oldCounter + 1, $newCounter);
    }