From ea4c25609dd23345fa1f639479421ff318e6f6c9 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 2 Dec 2014 13:51:36 +0100 Subject: Replace uniqid calls with $this->getUniqueID so tests pass again on windows --- tests/lib/memcache/apc.php | 2 +- tests/lib/memcache/apcu.php | 2 +- tests/lib/memcache/memcached.php | 6 +++--- tests/lib/memcache/xcache.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/lib/memcache') diff --git a/tests/lib/memcache/apc.php b/tests/lib/memcache/apc.php index 550d5068dc1..fdb785b9dc5 100644 --- a/tests/lib/memcache/apc.php +++ b/tests/lib/memcache/apc.php @@ -21,6 +21,6 @@ class APC extends Cache { $this->markTestSkipped('The apc extension is emulated by ACPu.'); return; } - $this->instance=new \OC\Memcache\APC(uniqid()); + $this->instance=new \OC\Memcache\APC($this->getUniqueID()); } } diff --git a/tests/lib/memcache/apcu.php b/tests/lib/memcache/apcu.php index 1b849e1c54d..afcaa99bfbe 100644 --- a/tests/lib/memcache/apcu.php +++ b/tests/lib/memcache/apcu.php @@ -17,6 +17,6 @@ class APCu extends Cache { $this->markTestSkipped('The APCu extension is not available.'); return; } - $this->instance=new \OC\Memcache\APCu(uniqid()); + $this->instance=new \OC\Memcache\APCu($this->getUniqueID()); } } diff --git a/tests/lib/memcache/memcached.php b/tests/lib/memcache/memcached.php index a94b809a7b5..51a78996dd4 100644 --- a/tests/lib/memcache/memcached.php +++ b/tests/lib/memcache/memcached.php @@ -16,14 +16,14 @@ class Memcached extends Cache { if (!\OC\Memcache\Memcached::isAvailable()) { self::markTestSkipped('The memcached extension is not available.'); } - $instance = new \OC\Memcache\Memcached(uniqid()); - if ($instance->set(uniqid(), uniqid()) === false) { + $instance = new \OC\Memcache\Memcached(self::getUniqueID()); + if ($instance->set(self::getUniqueID(), self::getUniqueID()) === false) { self::markTestSkipped('memcached server seems to be down.'); } } protected function setUp() { parent::setUp(); - $this->instance = new \OC\Memcache\Memcached(uniqid()); + $this->instance = new \OC\Memcache\Memcached($this->getUniqueID()); } } diff --git a/tests/lib/memcache/xcache.php b/tests/lib/memcache/xcache.php index b97d5545c6e..36efe0b220a 100644 --- a/tests/lib/memcache/xcache.php +++ b/tests/lib/memcache/xcache.php @@ -17,6 +17,6 @@ class XCache extends Cache { $this->markTestSkipped('The xcache extension is not available.'); return; } - $this->instance = new \OC\Memcache\XCache(uniqid()); + $this->instance = new \OC\Memcache\XCache($this->getUniqueID()); } } -- cgit v1.2.3