Deprecate the whole Predis\Helpers class.

This commit is contained in:
Daniele Alessandri
2013-02-17 14:48:37 +01:00
parent de4bae3f9b
commit 116eaba75e
31 changed files with 132 additions and 60 deletions
@@ -56,6 +56,22 @@ class CommunicationExceptionTest extends StandardTestCase
$this->assertTrue($exception->shouldResetConnection());
}
/**
* @group disconnected
* @expectedException Predis\CommunicationException
* @expectedExceptionMessage Communication error
*/
public function testCommunicationExceptionHandling()
{
$connection = $this->getMock('Predis\Connection\SingleConnectionInterface');
$connection->expects($this->once())->method('isConnected')->will($this->returnValue(true));
$connection->expects($this->once())->method('disconnect');
$exception = $this->getException($connection, 'Communication error');
CommunicationException::handle($exception);
}
// ******************************************************************** //
// ---- HELPER METHODS ------------------------------------------------ //
// ******************************************************************** //