Commit 943f1291 authored by Shawn Barratt's avatar Shawn Barratt
Browse files

Merged branch 0.1 into master

parents 5fadc944 112c967e
......@@ -4,13 +4,14 @@ namespace Ethereal;
use Predis\Client;
class Cache extends Predis\Client implements Ethereal\Cache\Interface
class Cache extends \Predis\Client implements Cache\CacheInterface
protected $namespace = '';
protected $server;
public function __construct($server)
public function __construct(array $server)
$this->server = $server;
namespace Ethereal\Cache;
interface CacheInterface
public function get($term);
public function set($term, $value);
public function setNamespace($term);
namespace Ethereal;
require_once dirname(dirname(__DIR__)).'/vendor/autoload.php';
class CacheTest extends \PHPUnit_Framework_TestCase
public $cache;
public function setup()
$this->cache = new Cache([
'scheme' => 'tcp',
'host' => 'redis',
'port' => 6379,
], [
'profile' => '3.0.3'
public function testCacheRetrieve()
$varName = 'testfield';
$varValue = 'testValue';
$this->cache->set($varName, $varValue);
$this->assertTrue(($this->cache->get($varName) == $varValue));
\ No newline at end of file
<phpunit verbose="true" colors="true">
<testsuite name="Ethereal lib Tests">
<directory suffix="Test.php">lib/tests</directory>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment