You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
508 B
24 lines
508 B
3 months ago
|
<?php
|
||
|
namespace STS\Backoff\Strategies;
|
||
|
|
||
|
use PHPUnit\Framework\TestCase;
|
||
|
|
||
|
class ConstantStrategyTest extends TestCase
|
||
|
{
|
||
|
public function testDefaults()
|
||
|
{
|
||
|
$s = new ConstantStrategy();
|
||
|
|
||
|
$this->assertEquals(100, $s->getBase());
|
||
|
}
|
||
|
|
||
|
public function testWaitTimes()
|
||
|
{
|
||
|
$s = new ConstantStrategy(100);
|
||
|
|
||
|
$this->assertEquals(100, $s->getWaitTime(1));
|
||
|
$this->assertEquals(100, $s->getWaitTime(2));
|
||
|
$this->assertEquals(100, $s->getWaitTime(3));
|
||
|
}
|
||
|
}
|