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.
23 lines
502 B
23 lines
502 B
<?php
|
|
namespace STS\Backoff\Strategies;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class LinearStrategyTest extends TestCase
|
|
{
|
|
public function testDefaults()
|
|
{
|
|
$s = new LinearStrategy();
|
|
|
|
$this->assertEquals(100, $s->getBase());
|
|
}
|
|
|
|
public function testWaitTimes()
|
|
{
|
|
$s = new LinearStrategy(100);
|
|
|
|
$this->assertEquals(100, $s->getWaitTime(1));
|
|
$this->assertEquals(200, $s->getWaitTime(2));
|
|
$this->assertEquals(300, $s->getWaitTime(3));
|
|
}
|
|
}
|
|
|