Skip to content

Commit 9a620b5

Browse files
committed
Keep php 5.3 support
1 parent 0451680 commit 9a620b5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/TestCase.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class TestCase extends \PHPUnit_Framework_TestCase {
4444
* @param mixed $default
4545
* @return mixed
4646
*/
47-
function array_get($array, $key, $default = null)
47+
private function array_get($array, $key, $default = null)
4848
{
4949
if (is_null($key)) return $array;
5050

@@ -79,11 +79,12 @@ public function makeDummyResponse($numberOfRecords = 10, $options = array())
7979

8080
$endRecord = $startRecord + min($maxRecords - 1, $numberOfRecords - $startRecord);
8181

82-
$records = implode('', array_map(function($n) {
82+
$recordTpl = $this->recordTpl;
83+
$records = implode('', array_map(function($n) use ($recordTpl) {
8384
return str_replace(
8485
array('{{position}}', '{{data}}'),
8586
array($n, 'RecordData #' . $n),
86-
$this->recordTpl
87+
$recordTpl
8788
);
8889
}, range($startRecord, $endRecord)));
8990

0 commit comments

Comments
 (0)