Kraken\_Unit\Channel\Extra\RequestTest::testApiRetryOrReset_ResetsInRetry_WhenIntervalIsEqualToZero PHP Метод

testApiRetryOrReset_ResetsInRetry_WhenIntervalIsEqualToZero() публичный Метод

    public function testApiRetryOrReset_ResetsInRetry_WhenIntervalIsEqualToZero()
    {
        $req = $this->createRequest($name = 'name', $mssg = 'secret', ['retriesInterval' => 0], ['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);
    }