Skip to content

Commit dbec931

Browse files
committed
fixes tests on PHP 5.3
1 parent 8fa1cd6 commit dbec931

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/PhpCollection/Tests/SequenceTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,8 @@ public function testMap()
293293
$this->seq->add('a');
294294
$this->seq->add('b');
295295

296-
$newSeq = $this->seq->map(function($elem) {
296+
$self = $this;
297+
$newSeq = $this->seq->map(function($elem) use ($self) {
297298
switch ($elem) {
298299
case 'a':
299300
return 'c';
@@ -302,7 +303,7 @@ public function testMap()
302303
return 'd';
303304

304305
default:
305-
$this->fail('Unexpected element.');
306+
$self->fail('Unexpected element.');
306307
}
307308
});
308309

0 commit comments

Comments
 (0)