|
|
@ -13,6 +13,8 @@ |
|
|
|
require_once dirname(__FILE__) . '/../../Registry.php'; |
|
|
|
require_once dirname(__FILE__) . '/../../Config.php'; |
|
|
|
require_once dirname(__FILE__) . '/../../redis/RedisManager.php'; |
|
|
|
require_once dirname(__FILE__) . '/../../exception/GeneralException.php'; |
|
|
|
|
|
|
|
|
|
|
|
class RedisManagerTest extends PHPUnit_Framework_TestCase |
|
|
|
{ |
|
|
@ -44,7 +46,7 @@ class RedisManagerTest extends PHPUnit_Framework_TestCase |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @expectedException Exception |
|
|
|
* @expectedException GeneralException |
|
|
|
* @expectedExceptionMessage Trying to get property of non-object |
|
|
|
* @TODO: line 34: $config = Config::get('Redis')->$name; - check for Redis config existence |
|
|
|
*/ |
|
|
@ -54,7 +56,7 @@ class RedisManagerTest extends PHPUnit_Framework_TestCase |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @expectedException Exception |
|
|
|
* @expectedException GeneralException |
|
|
|
* @expectedExceptionMessage Connection parameters must be an array |
|
|
|
*/ |
|
|
|
public function testConnectWrongPersistantConfig() |
|
|
@ -64,7 +66,7 @@ class RedisManagerTest extends PHPUnit_Framework_TestCase |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @expectedException Exception |
|
|
|
* @expectedException GeneralException |
|
|
|
* @expectedExceptionMessage Connection parameters must be an array |
|
|
|
*/ |
|
|
|
public function testConnectDefaultConfig() |
|
|
@ -74,7 +76,7 @@ class RedisManagerTest extends PHPUnit_Framework_TestCase |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @expectedException Exception |
|
|
|
* @expectedException GeneralException |
|
|
|
* @expectedExceptionMessage Failed to connect to Redis server at |
|
|
|
*/ |
|
|
|
public function testConnectFailedConnection() |
|
|
@ -84,7 +86,7 @@ class RedisManagerTest extends PHPUnit_Framework_TestCase |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @expectedException Exception |
|
|
|
* @expectedException GeneralException |
|
|
|
* @expectedExceptionMessage Failed to select Redis database with index |
|
|
|
*/ |
|
|
|
public function testConnectEstablishedConnectionNoDb() |
|
|
|