ConstantStrategyTest.php 508 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace STS\Backoff\Strategies;
  3. use PHPUnit\Framework\TestCase;
  4. class ConstantStrategyTest extends TestCase
  5. {
  6. public function testDefaults()
  7. {
  8. $s = new ConstantStrategy();
  9. $this->assertEquals(100, $s->getBase());
  10. }
  11. public function testWaitTimes()
  12. {
  13. $s = new ConstantStrategy(100);
  14. $this->assertEquals(100, $s->getWaitTime(1));
  15. $this->assertEquals(100, $s->getWaitTime(2));
  16. $this->assertEquals(100, $s->getWaitTime(3));
  17. }
  18. }