Skip to content

Commit

Permalink
fixes tests on PHP 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
schmittjoh committed Dec 13, 2013
1 parent 8fa1cd6 commit dbec931
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/PhpCollection/Tests/SequenceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ public function testMap()
$this->seq->add('a');
$this->seq->add('b');

$newSeq = $this->seq->map(function($elem) {
$self = $this;
$newSeq = $this->seq->map(function($elem) use ($self) {
switch ($elem) {
case 'a':
return 'c';
Expand All @@ -302,7 +303,7 @@ public function testMap()
return 'd';

default:
$this->fail('Unexpected element.');
$self->fail('Unexpected element.');
}
});

Expand Down

0 comments on commit dbec931

Please sign in to comment.