diff --git a/includes/filerepo/backend/SwiftFileBackend.php b/includes/filerepo/backend/SwiftFileBackend.php index dc6cd444585..e27744f6686 100644 --- a/includes/filerepo/backend/SwiftFileBackend.php +++ b/includes/filerepo/backend/SwiftFileBackend.php @@ -1129,7 +1129,7 @@ class SwiftFileBackend extends FileBackendStore { * * @param $container string Container name * @return CF_Container - * @throws InvalidResponseException + * @throws CloudFilesException */ protected function createContainer( $container ) { $conn = $this->getConnection(); // Swift proxy connection @@ -1143,12 +1143,12 @@ class SwiftFileBackend extends FileBackendStore { * * @param $container string Container name * @return void - * @throws InvalidResponseException + * @throws CloudFilesException */ protected function deleteContainer( $container ) { $conn = $this->getConnection(); // Swift proxy connection - $conn->delete_container( $container ); unset( $this->connContainers[$container] ); // purge cache + $conn->delete_container( $container ); } /** diff --git a/tests/phpunit/includes/filerepo/FileBackendTest.php b/tests/phpunit/includes/filerepo/FileBackendTest.php index 2b94778b371..710ad83e719 100644 --- a/tests/phpunit/includes/filerepo/FileBackendTest.php +++ b/tests/phpunit/includes/filerepo/FileBackendTest.php @@ -1392,8 +1392,11 @@ class FileBackendTest extends MediaWikiTestCase { private function doTestGetFileList() { $backendName = $this->backendClass(); - $base = $this->baseStorePath(); + + // Should have no errors + $iter = $this->backend->getFileList( array( 'dir' => "$base/unittest-cont-notexists" ) ); + $files = array( "$base/unittest-cont1/test1.txt", "$base/unittest-cont1/test2.txt",