Skip to content

Commit

Permalink
Removed array_map causing trouble with
Browse files Browse the repository at this point in the history
  • Loading branch information
amercier committed Nov 27, 2013
1 parent a1fe209 commit cae62f4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
11 changes: 5 additions & 6 deletions tests/integration/IOTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ class IOIntegrationTestCase extends AbstractCliScriptTestCase

protected function getValuesOutput()
{
return array_map(
function($i) {
return ($i + 1 < 10 ? ' ' : '') . ($i + 1) . '. ' . $this->values[$i];
},
array_keys($this->values)
);
$output = array();
foreach ($this->values as $i => $value) {
array_push($output, ($i + 1 < 10 ? ' ' : '') . ($i + 1) . '. ' . $value);
}
return $output;
}

public function testFormIsDisplayedCorrectlyAndReturnCorrectValue()
Expand Down
11 changes: 5 additions & 6 deletions tests/unit/IOTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ protected function createInputStream($lines)

protected function getValuesOutput()
{
return array_map(
function($i) {
return ($i + 1 < 10 ? ' ' : '') . ($i + 1) . '. ' . $this->values[$i];
},
array_keys($this->values)
);
$output = array();
foreach ($this->values as $i => $value) {
array_push($output, ($i + 1 < 10 ? ' ' : '') . ($i + 1) . '. ' . $value);
}
return $output;
}

public function testFormIsDisplayedCorrectly()
Expand Down

0 comments on commit cae62f4

Please sign in to comment.