protected function tearDown() { if (self::$storage) { self::$storage->purge(); self::$storage = false; } }
protected function setUp() { if (!extension_loaded('memcache')) { $this->markTestSkipped('MemcacheProfilerStorageTest requires that the extension memcache is loaded'); } self::$storage = new DummyMemcacheProfilerStorage('memcache://127.0.0.1:11211', '', '', 86400); try { self::$storage->getMemcache(); $stats = self::$storage->getMemcache()->getExtendedStats(); if (!isset($stats['127.0.0.1:11211']) || $stats['127.0.0.1:11211'] === false) { throw new \Exception(); } } catch (\Exception $e) { $this->markTestSkipped('MemcacheProfilerStorageTest requires that there is a Memcache server present on localhost'); } if (self::$storage) { self::$storage->purge(); } }