memcached.php 690 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * Copyright (c) 2013 Robin Appelman <icewind@owncloud.com>
  4. * This file is licensed under the Affero General Public License version 3 or
  5. * later.
  6. * See the COPYING-README file.
  7. */
  8. namespace Test\Memcache;
  9. class Memcached extends Cache {
  10. static public function setUpBeforeClass() {
  11. if (!\OC\Memcache\Memcached::isAvailable()) {
  12. self::markTestSkipped('The memcached extension is not available.');
  13. }
  14. $instance = new \OC\Memcache\Memcached(uniqid());
  15. if ($instance->set(uniqid(), uniqid()) === false) {
  16. self::markTestSkipped('memcached server seems to be down.');
  17. }
  18. }
  19. public function setUp() {
  20. $this->instance = new \OC\Memcache\Memcached(uniqid());
  21. }
  22. }