Skip to content
Snippets Groups Projects
Commit a67c7378 authored by Andreas Fischer's avatar Andreas Fischer
Browse files

Only run memcached tests if server is available.

parent 079d20a8
Branches
No related tags found
No related merge requests found
......@@ -10,6 +10,13 @@
namespace Test\Memcache;
class Memcached extends Cache {
static public function setUpBeforeClass() {
$instance = new \OC\Memcache\Memcached(uniqid());
if ($instance->set(uniqid(), uniqid()) === false) {
self::markTestSkipped('memcached server seems to be down.');
}
}
public function setUp() {
if (!\OC\Memcache\Memcached::isAvailable()) {
$this->markTestSkipped('The memcached extension is not available.');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment