]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Core/StorageManagerTest.php
Improve impossible exception-handler for storage move
[friendica.git] / tests / src / Core / StorageManagerTest.php
index 7cef2dc281e053aa3694f3402b2e766e32c10c55..084caa68ab09f2550526b69cc7d206c1d2ca1fbe 100644 (file)
@@ -265,4 +265,17 @@ class StorageManagerTest extends DatabaseTest
                        $this->assertNotEmpty($data);
                }
        }
+
+       /**
+        * Test moving data to a WRONG storage
+        *
+        * @expectedException \Friendica\Model\Storage\StorageException
+        * @expectedExceptionMessage Can't move to storage backend 'SystemResource'
+        */
+       public function testMoveStorageWrong()
+       {
+               $storageManager = new StorageManager($this->dba, $this->config, $this->logger, $this->l10n);
+               $storage = $storageManager->getByName(Storage\SystemResource::getName());
+               $storageManager->move($storage);
+       }
 }