Open Monograph Press  3.3.0
LinearBackoffStrategyTest.php
1 <?php
2 
4 
6 
11 {
12  public function testRetriesWithLinearDelay()
13  {
14  $strategy = new LinearBackoffStrategy(5);
15  $this->assertFalse($strategy->makesDecision());
16  $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false);
17  $this->assertEquals(0, $strategy->getBackoffPeriod(0, $request));
18  $this->assertEquals(5, $strategy->getBackoffPeriod(1, $request));
19  $this->assertEquals(10, $strategy->getBackoffPeriod(2, $request));
20  }
21 }
Guzzle\Tests\GuzzleTestCase
Definition: GuzzleTestCase.php:22
Guzzle\Tests\Plugin\Backoff\LinearBackoffStrategyTest
Definition: LinearBackoffStrategyTest.php:10
Guzzle\Tests\Plugin\Backoff\LinearBackoffStrategyTest\testRetriesWithLinearDelay
testRetriesWithLinearDelay()
Definition: LinearBackoffStrategyTest.php:12
Guzzle\Plugin\Backoff\LinearBackoffStrategy
Definition: LinearBackoffStrategy.php:14
Guzzle\Tests\Plugin\Backoff
Definition: AbstractBackoffStrategyTest.php:3