Skip to content

Commit

Permalink
Change PHP 5.4 array syntax back to make things 5.3 compatible.
Browse files Browse the repository at this point in the history
  • Loading branch information
nubs committed Mar 13, 2014
1 parent 58558aa commit 96dc498
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions tests/PredisTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function memoizeCallableWithCachedValue()
$count = 0;
$key = 'foo';
$value = 'bar';
$cachedValue = json_encode(['result' => $value]);
$cachedValue = json_encode(array('result' => $value));
$compute = function() use(&$count, $value) {
$count++;

Expand All @@ -43,7 +43,7 @@ public function memoizeCallableWithExceptionOnGet()
$count = 0;
$key = 'foo';
$value = 'bar';
$cachedValue = json_encode(['result' => $value]);
$cachedValue = json_encode(array('result' => $value));
$compute = function() use(&$count, $value) {
$count++;

Expand All @@ -69,7 +69,7 @@ public function memoizeCallableWithUncachedKey()
$count = 0;
$key = 'foo';
$value = 'bar';
$cachedValue = json_encode(['result' => $value]);
$cachedValue = json_encode(array('result' => $value));
$cacheTime = 1234;
$compute = function() use(&$count, $value) {
$count++;
Expand Down Expand Up @@ -98,7 +98,7 @@ public function memoizeCallableWithUncachedKeyWithExceptionOnSet()
$count = 0;
$key = 'foo';
$value = 'bar';
$cachedValue = json_encode(['result' => $value]);
$cachedValue = json_encode(array('result' => $value));
$compute = function() use(&$count, $value) {
$count++;

Expand All @@ -120,7 +120,18 @@ private function _getPredisMock()
{
return $this->getMock(
'\Predis\ClientInterface',
['get', 'set', 'expire', 'getProfile', 'getOptions', 'connect', 'disconnect', 'getConnection', 'createCommand', 'executeCommand']
array(
'get',
'set',
'expire',
'getProfile',
'getOptions',
'connect',
'disconnect',
'getConnection',
'createCommand',
'executeCommand',
)
);
}
}

0 comments on commit 96dc498

Please sign in to comment.