Skip to content

Commit

Permalink
testcase-3追加 出力する社員番号は昇順に並べ替える
Browse files Browse the repository at this point in the history
  • Loading branch information
77web committed Aug 17, 2014
1 parent c2e79b3 commit ca05271
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Util/OutputFormatter.php
Expand Up @@ -18,6 +18,7 @@ public function format(array $lessons)
foreach ($lesson->getMembers() as $staff) {
$staffIds[] = $staff->getId();
}
sort($staffIds);

$outputs[] = sprintf('%d_%s', $lesson->getDay(), implode(':', $staffIds));
}
Expand Down
3 changes: 2 additions & 1 deletion tests/EnglishClassTest.php
Expand Up @@ -33,7 +33,8 @@ public function provideInputAndOutput()
return [
['1_12345', '1_1'],
['30_32451', '3_30'],
['1_12345|2_12345', '1_1:2']
['1_12345|2_12345', '1_1:2'],
['3_12345|2_12345|1_12345', '1_1:2:3'],
];
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Util/OutputFormatterTest.php
Expand Up @@ -25,7 +25,7 @@ public function provideTestData()
{
$lesson1 = $this->makeLessonMock(1, [1]);
$lesson2 = $this->makeLessonMock(1, [1]);
$lesson3 = $this->makeLessonMock(2, [2, 3]);
$lesson3 = $this->makeLessonMock(2, [3, 2]);

return [
[[$lesson1], '1_1'],
Expand Down

0 comments on commit ca05271

Please sign in to comment.