Skip to content

Commit

Permalink
adding a test mocking Predis Client
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Mansour committed Feb 18, 2014
1 parent fc977ca commit b8f6c0f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"php": ">=5.3.3"
},
"require-dev": {
"atoum/atoum": "master-dev"
"atoum/atoum": "master-dev",
"predis/predis": "~0.8"
}
}
15 changes: 15 additions & 0 deletions tests/units/RedisMockFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b8f6c0f

Please sign in to comment.