mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Adapt test to fixed command output.
No user and non-existing user are now correctly treated as two separated cases Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
6090807d0b
commit
0c1d0ea1fd
1 changed files with 14 additions and 3 deletions
|
|
@ -333,9 +333,6 @@ The file \"/$this->userId/files/sub/hello.txt\" is: OK", $output);
|
|||
$this->assertStringNotContainsString('world.txt', $output);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test commands with a directory path
|
||||
*/
|
||||
public function testExecuteWithNoUser() {
|
||||
$this->util->expects($this->once())->method('isMasterKeyEnabled')
|
||||
->willReturn(true);
|
||||
|
|
@ -347,6 +344,20 @@ The file \"/$this->userId/files/sub/hello.txt\" is: OK", $output);
|
|||
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertStringContainsString('No user id provided', $output);
|
||||
}
|
||||
|
||||
public function testExecuteWithBadUser() {
|
||||
$this->util->expects($this->once())->method('isMasterKeyEnabled')
|
||||
->willReturn(true);
|
||||
|
||||
$this->commandTester->execute([
|
||||
'user' => 'nonexisting',
|
||||
'--path' => "/"
|
||||
]);
|
||||
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertStringContainsString('does not exist', $output);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue