From 13d3257e71030575a3a80d7464cf9dc8dc412202 Mon Sep 17 00:00:00 2001 From: Uyi Ehondor Date: Wed, 20 Aug 2014 08:49:36 +0100 Subject: [PATCH] Save changes --- .../library/Rhubarb/Connector/PredisTest.php | 61 ------------------- tests/library/Rhubarb/PredisTest.php | 22 +++++++ 2 files changed, 22 insertions(+), 61 deletions(-) delete mode 100644 tests/library/Rhubarb/Connector/PredisTest.php diff --git a/tests/library/Rhubarb/Connector/PredisTest.php b/tests/library/Rhubarb/Connector/PredisTest.php deleted file mode 100644 index 3929eb6..0000000 --- a/tests/library/Rhubarb/Connector/PredisTest.php +++ /dev/null @@ -1,61 +0,0 @@ -connector = new PredisConnector(); - } - - public function testSetOptionsWhenNonZeroRedisDatabaseNumberIsSpecified() - { - $this->connector->setOptions( - array('connection' => 'redis://127.0.0.1:6379/3') - ); - - $expectedOptions = array( - 'connection' => array( - 'database'=> 3, - 'host' => '127.0.0.1', - 'port' => 6379, - 'login' => null, - 'password' => null - ), - 'options' => array() - ); - - $this->assertEquals($expectedOptions, $this->connector->getOptions()); - } -} diff --git a/tests/library/Rhubarb/PredisTest.php b/tests/library/Rhubarb/PredisTest.php index 7ba9f20..68f2a55 100644 --- a/tests/library/Rhubarb/PredisTest.php +++ b/tests/library/Rhubarb/PredisTest.php @@ -1,6 +1,8 @@ assertEquals(2105, $res->get()); } + public function testSetOptionsWhenNonZeroRedisDatabaseNumberIsSpecified() + { + $connector = new PredisConnector(); + $connector->setOptions( + array('connection' => 'redis://127.0.0.1:6379/3') + ); + + $expectedOptions = array( + 'connection' => array( + 'database'=> 3, + 'host' => '127.0.0.1', + 'port' => 6379, + 'login' => null, + 'password' => null + ), + 'options' => array() + ); + + $this->assertEquals($expectedOptions, $connector->getOptions()); + } }