8000 Properly skip memcached tests when no memcached server is present · tamirvs/symfony@e67f8d4 · GitHub
[go: up one dir, main page]

Skip to content

Commit e67f8d4

Browse files
committed
Properly skip memcached tests when no memcached server is present
1 parent 005d86f commit e67f8d4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/Symfony/Tests/Component/HttpKernel/Profiler/MemcacheProfilerStorageTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ protected function setUp()
4242
self::$storage = new DummyMemcacheProfilerStorage('memcache://127.0.0.1/11211', '', '', 86400);
4343
try {
4444
self::$storage->getMemcache();
45+
$stats = self::$storage->getMemcache()->getExtendedStats();
46+
if (!isset($stats['127.0.0.1:11211']) || $stats['127.0.0.1:11211'] === false) {
47+
throw new \Exception();
48+
}
4549
} catch(\Exception $e) {
4650
$this->markTestSkipped('MemcacheProfilerStorageTest requires that there is a Memcache server present on localhost');
4751
}

0 commit comments

Comments
 (0)
0