1
0

memcached.php 788 B

1234567891011121314151617181920212223242526272829
  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. parent::setUpBeforeClass();
  12. if (!\OC\Memcache\Memcached::isAvailable()) {
  13. self::markTestSkipped('The memcached extension is not available.');
  14. }
  15. $instance = new \OC\Memcache\Memcached(self::getUniqueID());
  16. if ($instance->set(self::getUniqueID(), self::getUniqueID()) === false) {
  17. self::markTestSkipped('memcached server seems to be down.');
  18. }
  19. }
  20. protected function setUp() {
  21. parent::setUp();
  22. $this->instance = new \OC\Memcache\Memcached($this->getUniqueID());
  23. }
  24. }