| @@ 55-70 (lines=16) @@ | ||
| 52 | ->set(Injector::class, MemcachedCache::class, MockCache::class); |
|
| 53 | } |
|
| 54 | ||
| 55 | public function testApcuCacheFactory() |
|
| 56 | { |
|
| 57 | $cache = Injector::inst()->get(CacheInterface::class .'.TestApcuCache'); |
|
| 58 | $this->assertInstanceOf( |
|
| 59 | MockCache::class, |
|
| 60 | $cache |
|
| 61 | ); |
|
| 62 | $this->assertEquals( |
|
| 63 | [ |
|
| 64 | 'TestApcuCache_'.md5(BASE_PATH), |
|
| 65 | 2600, |
|
| 66 | 4400 |
|
| 67 | ], |
|
| 68 | $cache->getArgs() |
|
| 69 | ); |
|
| 70 | } |
|
| 71 | ||
| 72 | public function testMemCacheFactory() |
|
| 73 | { |
|
| @@ 72-87 (lines=16) @@ | ||
| 69 | ); |
|
| 70 | } |
|
| 71 | ||
| 72 | public function testMemCacheFactory() |
|
| 73 | { |
|
| 74 | $cache = Injector::inst()->get(CacheInterface::class .'.TestMemcache'); |
|
| 75 | $this->assertInstanceOf( |
|
| 76 | MockCache::class, |
|
| 77 | $cache |
|
| 78 | ); |
|
| 79 | $this->assertEquals( |
|
| 80 | [ |
|
| 81 | null, |
|
| 82 | 'TestMemCache_'.md5(BASE_PATH), |
|
| 83 | 5600 |
|
| 84 | ], |
|
| 85 | $cache->getArgs() |
|
| 86 | ); |
|
| 87 | } |
|
| 88 | } |
|
| 89 | ||