diff --git a/composer.json b/composer.json index 54039ab..597ab1e 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,7 @@ "php": ">=5.3.3" }, "require-dev": { - "atoum/atoum": "master-dev" + "atoum/atoum": "master-dev", + "predis/predis": "~0.8" } } diff --git a/tests/units/RedisMockFactory.php b/tests/units/RedisMockFactory.php index 8522b8f..3cabbf0 100644 --- a/tests/units/RedisMockFactory.php +++ b/tests/units/RedisMockFactory.php @@ -150,6 +150,21 @@ public function testGetAdapterClass() ->error() ->notExists(); } + + /** + * mock a concrete Predis Client + * + * @return void + */ + public function testPredis() + { + $factory = new Factory(); + $mock = $factory->getAdapter('Predis\Client', true); + + $this->assert + ->object($mock) + ->isInstanceOf('M6Web\Component\RedisMock\RedisMock_Predis_Client_Adapter'); + } } class RedisWithMethods