File tree Expand file tree Collapse file tree
tests/Unit/Business/Adapter/Concrete Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
2- "name" : " micro/plugin-cache-core " ,
3- "description" : " Micro Framework: Cache core component " ,
2+ "name" : " micro/plugin-cache" ,
3+ "description" : " Micro Framework: Plugin implements PSR6 and PSR16 cache " ,
44 "license" : " MIT" ,
55 "type" : " micro-plugin" ,
66 "authors" : [
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ class RedisFactoryTest extends TestCase
2727 */
2828 public function testCreate (bool $ isRedisInstalled )
2929 {
30- if (!\extension_loaded ('redis ' )) {
30+ $ extLoaded = \extension_loaded ('redis ' );
31+ if (!$ extLoaded ) {
3132 $ this ->expectException (CacheException::class);
3233 $ this ->expectExceptionMessage ('Extension `redis` should be installed. ' );
3334 }
@@ -48,8 +49,10 @@ public function testCreate(bool $isRedisInstalled)
4849// return $facade;
4950// });
5051// } else {
51- $ this ->expectException (CacheException::class);
52- $ this ->expectExceptionMessage ('Plugin `micro/plugin-redis` should be installed. ' );
52+ if ($ extLoaded ) {
53+ $ this ->expectException (CacheException::class);
54+ $ this ->expectExceptionMessage ('Plugin `micro/plugin-redis` should be installed. ' );
55+ }
5356// }
5457
5558 $ factory = new RedisFactory ($ container );
You can’t perform that action at this time.
0 commit comments