PHP Classes

File: tests/eMapper/SQLite/Cache/MemcachedTest.php

Recommend this page to a friend!
  Classes of Emmanuel Antico   eMapper   tests/eMapper/SQLite/Cache/MemcachedTest.php   Download  
File: tests/eMapper/SQLite/Cache/MemcachedTest.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: eMapper
Database abstraction layer that maps data types
Author: By
Last change: Modified: Cache tests.
Date: 9 years ago
Size: 610 bytes
 

Contents

Class file image Download
<?php
namespace eMapper\SQLite\Cache;

use
eMapper\Cache\MemcachedProvider;

/**
 * Tests MemcachedProvider with SQLiteMapper class
 * @author emaphp
 * @group sqlite
 * @group cache
 * @group memcached
 */
class MemcachedTest extends SQLiteCacheTest {
    protected function
setUp() {
        try {
           
$this->provider = new MemcachedProvider();
           
$this->provider->addServer('localhost', 11211);
        }
        catch (\
RuntimeException $re) {
           
$this->markTestSkipped(
                   
'The Memcached extension is not available.'
           
);
        }

       
$this->mapper = $this->getMapper();
       
$this->mapper->setCacheProvider($this->provider);
    }
}
?>