CouchbaseCacheTest.php 684 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace Doctrine\Tests\Common\Cache;
  3. use Couchbase;
  4. use Doctrine\Common\Cache\CouchbaseCache;
  5. /**
  6. * @requires extension couchbase
  7. */
  8. class CouchbaseCacheTest extends CacheTest
  9. {
  10. private $couchbase;
  11. protected function setUp()
  12. {
  13. try {
  14. $this->couchbase = new Couchbase('127.0.0.1', 'Administrator', 'password', 'default');
  15. } catch(Exception $ex) {
  16. $this->markTestSkipped('Could not instantiate the Couchbase cache because of: ' . $ex);
  17. }
  18. }
  19. protected function _getCacheDriver()
  20. {
  21. $driver = new CouchbaseCache();
  22. $driver->setCouchbase($this->couchbase);
  23. return $driver;
  24. }
  25. }