Total Complexity | 2 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class RedisOptionBuilderFeatureTest extends TestCase |
||
6 | { |
||
7 | public function test_it_builds_redis_options() |
||
8 | { |
||
9 | $options = OptionBuilder::forRedis() |
||
10 | ->setNamespace('app:') |
||
11 | ->expirationTime('2 hours') |
||
12 | ->flushAfter('1 day') |
||
13 | ->build(); |
||
14 | |||
15 | $this->assertArrayHasKey('namespace', $options); |
||
16 | $this->assertArrayHasKey('expirationTime', $options); |
||
17 | $this->assertArrayHasKey('flushAfter', $options); |
||
18 | |||
19 | $this->assertSame('app:', $options['namespace']); |
||
20 | $this->assertSame('2 hours', $options['expirationTime']); |
||
21 | $this->assertSame('1 day', $options['flushAfter']); |
||
22 | } |
||
23 | |||
24 | public function test_it_allows_timebuilder_for_redis() |
||
33 | } |
||
34 | } |
||
35 |