Skip to content

Commit

Permalink
Fixup StoragesServiceTest expectException
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Dec 1, 2019
1 parent e2a0c13 commit 4f42780
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/lib/Files/External/Service/StoragesServiceTest.php
Expand Up @@ -235,7 +235,9 @@ protected function makeStorageConfig($data) {
/**
*/
public function testNonExistingStorage() {
$this->expectException(\OCP\Files\External\NotFoundException::class);
if ($this->getExpectedException() === null) {
$this->expectException(\OCP\Files\External\NotFoundException::class);
}

$backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\SMB');
$authMechanism = $this->backendService->getAuthMechanism('identifier:\Auth\Mechanism');
Expand Down Expand Up @@ -320,7 +322,9 @@ public function testDeleteStorage($backendOptions, $rustyStorageId, $expectedCou
/**
*/
public function testDeleteUnexistingStorage() {
$this->expectException(\OCP\Files\External\NotFoundException::class);
if ($this->getExpectedException() === null) {
$this->expectException(\OCP\Files\External\NotFoundException::class);
}

$this->service->removeStorage(255);
}
Expand Down

0 comments on commit 4f42780

Please sign in to comment.