Skip to content

Commit

Permalink
Save changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Uyi Ehondor committed Aug 20, 2014
1 parent 99f453d commit 13d3257
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 61 deletions.
61 changes: 0 additions & 61 deletions tests/library/Rhubarb/Connector/PredisTest.php

This file was deleted.

22 changes: 22 additions & 0 deletions tests/library/Rhubarb/PredisTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php
namespace RhubarbTests;

use Rhubarb\Connector\Predis as PredisConnector;

/**
* @license http://www.apache.org/licenses/LICENSE-2.0
* Copyright [2012] [Robert Allen]
Expand Down Expand Up @@ -64,4 +66,24 @@ public function testJobSubmit()
// $this->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());
}
}

0 comments on commit 13d3257

Please sign in to comment.