Browse Source

replace Exception on GeneralException

master
Vyacheslav Agafonov 13 years ago
parent
commit
d4705b1c89
  1. 3
      tests/redis/RedisDebugTest.php
  2. 12
      tests/redis/RedisManagerTest.php

3
tests/redis/RedisDebugTest.php

@ -14,6 +14,7 @@ require_once dirname(__FILE__) . '/../../exception/GeneralException.php';
require_once dirname(__FILE__) . '/../../util/profiler/CommandProfiler.php'; require_once dirname(__FILE__) . '/../../util/profiler/CommandProfiler.php';
require_once dirname(__FILE__) . '/../../util/profiler/Profiler.php'; require_once dirname(__FILE__) . '/../../util/profiler/Profiler.php';
require_once dirname(__FILE__) . '/../../redis/RedisDebug.php'; require_once dirname(__FILE__) . '/../../redis/RedisDebug.php';
require_once dirname(__FILE__) . '/../../exception/GeneralException.php';
class RedisDebugTest extends PHPUnit_Framework_TestCase class RedisDebugTest extends PHPUnit_Framework_TestCase
{ {
@ -84,7 +85,7 @@ class RedisDebugTest extends PHPUnit_Framework_TestCase
} }
/** /**
* @expectedException Exception
* @expectedException GeneralException
* @expectedExceptionMessage call_user_func_array() expects parameter 1 to be a valid callback * @expectedExceptionMessage call_user_func_array() expects parameter 1 to be a valid callback
* @runInSeparateProcess * @runInSeparateProcess
*/ */

12
tests/redis/RedisManagerTest.php

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

Loading…
Cancel
Save