protected function setUp() { parent::setUp(); if (!\Yii::$app) { $this->mockWebApplication(['components' => ['cache' => ['class' => \yii\caching\ArrayCache::className()]]]); } }
/** * @requires extension redis */ protected function setUp() { if (!extension_loaded('redis')) { $this->markTestSkipped('redis extension not installed'); } $this->redis = new \Redis(); if (false === @$this->redis->connect('127.0.0.1')) { unset($this->redis); $this->markTestSkipped('Could not connect to Redis instance'); } parent::setUp(); }
/** * @requires extension redis */ protected function setUp() { if (!extension_loaded('redis')) { $this->markTestSkipped('redis extension not installed'); } $redis = new \Redis(); if (false === @$redis->connect('127.0.0.1')) { $this->markTestSkipped('Could not connect to Redis instance'); } $redis->flushAll(); $this->driver = new RedisDriver($redis); $this->driver->clear(); parent::setUp(); }