summaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests/Service/StoragesServiceTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/tests/Service/StoragesServiceTest.php')
-rw-r--r--apps/files_external/tests/Service/StoragesServiceTest.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/apps/files_external/tests/Service/StoragesServiceTest.php b/apps/files_external/tests/Service/StoragesServiceTest.php
index 140bbdc772b..33186724338 100644
--- a/apps/files_external/tests/Service/StoragesServiceTest.php
+++ b/apps/files_external/tests/Service/StoragesServiceTest.php
@@ -252,10 +252,7 @@ abstract class StoragesServiceTest extends \Test\TestCase {
}
-
- public function testNonExistingStorage() {
- $this->expectException(\OCA\Files_External\NotFoundException::class);
-
+ protected function ActualNonExistingStorageTest() {
$backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\SMB');
$authMechanism = $this->backendService->getAuthMechanism('identifier:\Auth\Mechanism');
$storage = new StorageConfig(255);
@@ -265,6 +262,12 @@ abstract class StoragesServiceTest extends \Test\TestCase {
$this->service->updateStorage($storage);
}
+ public function testNonExistingStorage() {
+ $this->expectException(\OCA\Files_External\NotFoundException::class);
+
+ $this->ActualNonExistingStorageTest();
+ }
+
public function deleteStorageDataProvider() {
return [
// regular case, can properly delete the oc_storages entry
@@ -334,11 +337,14 @@ abstract class StoragesServiceTest extends \Test\TestCase {
$this->assertCount($expectedCountAfterDeletion, $storages, "expected $expectedCountAfterDeletion storages, got " . json_encode($storages));
}
-
+ protected function actualDeletedUnexistingStorageTest() {
+ $this->service->removeStorage(255);
+ }
+
public function testDeleteUnexistingStorage() {
$this->expectException(\OCA\Files_External\NotFoundException::class);
- $this->service->removeStorage(255);
+ $this->actualDeletedUnexistingStorageTest();
}
public function testCreateStorage() {