mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 09:13:19 -04:00
test: Corrently store return to test it
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
fcb7ad4690
commit
00ffe7eda8
1 changed files with 4 additions and 4 deletions
|
|
@ -74,7 +74,7 @@ class AddTest extends TestCase {
|
|||
->with($groupId, $settingClass)
|
||||
->willReturn($authorizedGroup);
|
||||
|
||||
$this->invokePrivate($this->command, 'execute', [$this->input, $this->output]);
|
||||
$result = self::invokePrivate($this->command, 'execute', [$this->input, $this->output]);
|
||||
|
||||
$this->assertEquals(0, $result);
|
||||
}
|
||||
|
|
@ -103,7 +103,7 @@ class AddTest extends TestCase {
|
|||
->with($groupId, $settingClass)
|
||||
->willThrowException(new ConflictException('Group is already assigned to this class'));
|
||||
|
||||
$this->invokePrivate($this->command, 'execute', [$this->input, $this->output]);
|
||||
$result = self::invokePrivate($this->command, 'execute', [$this->input, $this->output]);
|
||||
|
||||
$this->assertEquals(4, $result, 'Duplicate assignment should return exit code 4');
|
||||
}
|
||||
|
|
@ -117,7 +117,7 @@ class AddTest extends TestCase {
|
|||
->with('settingClass')
|
||||
->willReturn($settingClass);
|
||||
|
||||
$this->invokePrivate($this->command, 'execute', [$this->input, $this->output]);
|
||||
$result = self::invokePrivate($this->command, 'execute', [$this->input, $this->output]);
|
||||
|
||||
// Should return exit code 2 for invalid setting class
|
||||
$this->assertEquals(2, $result);
|
||||
|
|
@ -140,7 +140,7 @@ class AddTest extends TestCase {
|
|||
->with($groupId)
|
||||
->willReturn(false);
|
||||
|
||||
$this->invokePrivate($this->command, 'execute', [$this->input, $this->output]);
|
||||
$result = self::invokePrivate($this->command, 'execute', [$this->input, $this->output]);
|
||||
|
||||
// Should return exit code 3 for non-existent group
|
||||
$this->assertEquals(3, $result);
|
||||
|
|
|
|||
Loading…
Reference in a new issue