Skip to content

Commit

Permalink
Fix ScanTest testMultipleGroups for test input with 4 groups
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Mar 22, 2019
1 parent b2b844b commit 568cb77
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions apps/files/tests/Command/ScanTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,20 @@ public function testMultipleGroups($input) {
if (\count($groups) === 2) {
$this->assertContains('Starting scan for user 1 out of 10 (user1)', $output);
$this->assertContains('Starting scan for user 1 out of 10 (user11)', $output);
}
if (\count($groups) === 3) {
} elseif (\count($groups) === 3) {
$this->assertContains('Starting scan for user 1 out of 10 (user1)', $output);
$this->assertContains('Starting scan for user 1 out of 10 (user11)', $output);
$this->assertContains('Starting scan for user 1 out of 10 (user21)', $output);
$this->assertContains('Starting scan for user 10 out of 10 (user30)', $output);
} elseif (\count($groups) === 4) {
$this->assertContains('Starting scan for user 1 out of 10 (user1)', $output);
$this->assertContains('Starting scan for user 1 out of 20 (user11)', $output);
$this->assertContains('Starting scan for user 11 out of 20 (user21)', $output);
$this->assertContains('Starting scan for user 10 out of 10 (user40)', $output);
} else {
$this->fail(
"testMultipleGroups supports testing with 2,3, or 4 groups but the input has $groups groups"
);
}
}

Expand Down

0 comments on commit 568cb77

Please sign in to comment.