Merge "Add line breaks to the output of action=info"
[lhc/web/wiklou.git] / tests / phpunit / includes / filerepo / FileRepoTest.php
index ca34442..7cc25b1 100644 (file)
@@ -8,12 +8,14 @@ class FileRepoTest extends MediaWikiTestCase {
        function testFileRepoConstructionOptionCanNotBeNull() {
                $f = new FileRepo();
        }
+
        /**
         * @expectedException MWException
         */
        function testFileRepoConstructionOptionCanNotBeAnEmptyArray() {
                $f = new FileRepo( array() );
        }
+
        /**
         * @expectedException MWException
         */
@@ -22,6 +24,7 @@ class FileRepoTest extends MediaWikiTestCase {
                        'backend' => 'foobar'
                ) );
        }
+
        /**
         * @expectedException MWException
         */
@@ -31,4 +34,15 @@ class FileRepoTest extends MediaWikiTestCase {
                ) );
        }
 
+       function testFileRepoConstructionWithRequiredOptions() {
+               $f = new FileRepo( array(
+                       'name' => 'FileRepoTestRepository',
+                       'backend' => new FSFileBackend( array(
+                               'name' => 'local-testing',
+                               'lockManager' => 'nullLockManager',
+                               'containerPaths' => array()
+                       ) )
+               ) );
+               $this->assertInstanceOf( 'FileRepo', $f );
+       }
 }