Add association @group from exceptions redis of the tests
This commit is contained in:
@ -26,12 +26,18 @@ class RedisDebugTest extends PHPUnit_Framework_TestCase
|
|||||||
return parent::run($result);
|
return parent::run($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group Redis
|
||||||
|
*/
|
||||||
public function testConstructException()
|
public function testConstructException()
|
||||||
{
|
{
|
||||||
$this->setExpectedException('GeneralException');
|
$this->setExpectedException('GeneralException');
|
||||||
$redisDebug = new RedisDebug('redis');
|
$redisDebug = new RedisDebug('redis');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group Redis
|
||||||
|
*/
|
||||||
public function testConstructGood()
|
public function testConstructGood()
|
||||||
{
|
{
|
||||||
$mock = $this->getMock('Redis');
|
$mock = $this->getMock('Redis');
|
||||||
@ -47,6 +53,7 @@ class RedisDebugTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @runInSeparateProcess
|
* @runInSeparateProcess
|
||||||
|
* @group Redis
|
||||||
*/
|
*/
|
||||||
public function testCallSimpleParams()
|
public function testCallSimpleParams()
|
||||||
{
|
{
|
||||||
@ -66,6 +73,7 @@ class RedisDebugTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @runInSeparateProcess
|
* @runInSeparateProcess
|
||||||
|
* @group Redis
|
||||||
*/
|
*/
|
||||||
public function testCallArrayParam()
|
public function testCallArrayParam()
|
||||||
{
|
{
|
||||||
@ -85,6 +93,7 @@ class RedisDebugTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @runInSeparateProcess
|
* @runInSeparateProcess
|
||||||
|
* @group Redis
|
||||||
*/
|
*/
|
||||||
public function testCallUndefinedMethod()
|
public function testCallUndefinedMethod()
|
||||||
{
|
{
|
||||||
|
@ -42,12 +42,18 @@ class RedisManagerTest extends PHPUnit_Framework_TestCase
|
|||||||
set_new_overload(array($this, 'newCallback'));
|
set_new_overload(array($this, 'newCallback'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group Redis
|
||||||
|
*/
|
||||||
public function testConnectNoAnyConfig()
|
public function testConnectNoAnyConfig()
|
||||||
{
|
{
|
||||||
$this->setExpectedException('GeneralException', 'Redis config no existence');
|
$this->setExpectedException('GeneralException', 'Redis config no existence');
|
||||||
RedisManager::connect();
|
RedisManager::connect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group Redis
|
||||||
|
*/
|
||||||
public function testConnectWrongPersistantConfig()
|
public function testConnectWrongPersistantConfig()
|
||||||
{
|
{
|
||||||
Config::set('Redis', array('new' => 'some'));
|
Config::set('Redis', array('new' => 'some'));
|
||||||
@ -55,6 +61,9 @@ class RedisManagerTest extends PHPUnit_Framework_TestCase
|
|||||||
RedisManager::connect('new');
|
RedisManager::connect('new');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group Redis
|
||||||
|
*/
|
||||||
public function testConnectDefaultConfig()
|
public function testConnectDefaultConfig()
|
||||||
{
|
{
|
||||||
Config::set('Redis', array('default' => 'some'));
|
Config::set('Redis', array('default' => 'some'));
|
||||||
@ -62,6 +71,9 @@ class RedisManagerTest extends PHPUnit_Framework_TestCase
|
|||||||
RedisManager::connect();
|
RedisManager::connect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group Redis
|
||||||
|
*/
|
||||||
public function testConnectFailedConnection()
|
public function testConnectFailedConnection()
|
||||||
{
|
{
|
||||||
Config::set('Redis', array('new' => array('host' => 'error', 'port' => 2023, 'database' => 'some')));
|
Config::set('Redis', array('new' => array('host' => 'error', 'port' => 2023, 'database' => 'some')));
|
||||||
@ -69,6 +81,9 @@ class RedisManagerTest extends PHPUnit_Framework_TestCase
|
|||||||
RedisManager::connect('new');
|
RedisManager::connect('new');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group Redis
|
||||||
|
*/
|
||||||
public function testConnectEstablishedConnectionNoDb()
|
public function testConnectEstablishedConnectionNoDb()
|
||||||
{
|
{
|
||||||
Config::set('Redis', array('new' => array('host' => true, 'port' => 2023, 'database' => 'some')));
|
Config::set('Redis', array('new' => array('host' => true, 'port' => 2023, 'database' => 'some')));
|
||||||
@ -76,6 +91,9 @@ class RedisManagerTest extends PHPUnit_Framework_TestCase
|
|||||||
RedisManager::connect('new');
|
RedisManager::connect('new');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group Redis
|
||||||
|
*/
|
||||||
public function testConnectionGood()
|
public function testConnectionGood()
|
||||||
{
|
{
|
||||||
Config::set('Redis', array('new' => array('host' => true, 'port' => 2023, 'database' => true)));
|
Config::set('Redis', array('new' => array('host' => true, 'port' => 2023, 'database' => true)));
|
||||||
@ -85,6 +103,7 @@ class RedisManagerTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @runInSeparateProcess
|
* @runInSeparateProcess
|
||||||
|
* @group Redis
|
||||||
*/
|
*/
|
||||||
public function testConnectWithDebug()
|
public function testConnectWithDebug()
|
||||||
{
|
{
|
||||||
@ -98,6 +117,9 @@ class RedisManagerTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertInstanceOf('RedisDebugMock', $redis);
|
$this->assertInstanceOf('RedisDebugMock', $redis);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group Redis
|
||||||
|
*/
|
||||||
public function testConnectWithConfigArray()
|
public function testConnectWithConfigArray()
|
||||||
{
|
{
|
||||||
$config = array('host' => true, 'port' => 2023, 'database' => true);
|
$config = array('host' => true, 'port' => 2023, 'database' => true);
|
||||||
|
Reference in New Issue
Block a user