Skip to content

Commit 96dc498

Browse files
author
Spencer Rinehart
committed
Change PHP 5.4 array syntax back to make things 5.3 compatible.
1 parent 58558aa commit 96dc498

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

tests/PredisTest.php

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function memoizeCallableWithCachedValue()
1616
$count = 0;
1717
$key = 'foo';
1818
$value = 'bar';
19-
$cachedValue = json_encode(['result' => $value]);
19+
$cachedValue = json_encode(array('result' => $value));
2020
$compute = function() use(&$count, $value) {
2121
$count++;
2222

@@ -43,7 +43,7 @@ public function memoizeCallableWithExceptionOnGet()
4343
$count = 0;
4444
$key = 'foo';
4545
$value = 'bar';
46-
$cachedValue = json_encode(['result' => $value]);
46+
$cachedValue = json_encode(array('result' => $value));
4747
$compute = function() use(&$count, $value) {
4848
$count++;
4949

@@ -69,7 +69,7 @@ public function memoizeCallableWithUncachedKey()
6969
$count = 0;
7070
$key = 'foo';
7171
$value = 'bar';
72-
$cachedValue = json_encode(['result' => $value]);
72+
$cachedValue = json_encode(array('result' => $value));
7373
$cacheTime = 1234;
7474
$compute = function() use(&$count, $value) {
7575
$count++;
@@ -98,7 +98,7 @@ public function memoizeCallableWithUncachedKeyWithExceptionOnSet()
9898
$count = 0;
9999
$key = 'foo';
100100
$value = 'bar';
101-
$cachedValue = json_encode(['result' => $value]);
101+
$cachedValue = json_encode(array('result' => $value));
102102
$compute = function() use(&$count, $value) {
103103
$count++;
104104

@@ -120,7 +120,18 @@ private function _getPredisMock()
120120
{
121121
return $this->getMock(
122122
'\Predis\ClientInterface',
123-
['get', 'set', 'expire', 'getProfile', 'getOptions', 'connect', 'disconnect', 'getConnection', 'createCommand', 'executeCommand']
123+
array(
124+
'get',
125+
'set',
126+
'expire',
127+
'getProfile',
128+
'getOptions',
129+
'connect',
130+
'disconnect',
131+
'getConnection',
132+
'createCommand',
133+
'executeCommand',
134+
)
124135
);
125136
}
126137
}

0 commit comments

Comments
 (0)