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