Total Complexity | 3 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class RateLimiterTest extends Unit |
||
9 | { |
||
10 | /** |
||
11 | * @dataProvider dataSetUp |
||
12 | */ |
||
13 | public function testSetUp(array $config): void |
||
14 | { |
||
15 | $limiter = new RateLimiter($config); |
||
16 | $redis = $limiter->redis; |
||
17 | $this->assertSame(Yii::$app->get('redis'), $redis); |
||
18 | foreach ($config as $name => $val) { |
||
19 | $this->assertSame($val, $limiter->$name); |
||
20 | } |
||
21 | } |
||
22 | |||
23 | public function dataSetUp(): array |
||
28 | ]; |
||
29 | } |
||
31 |