MediaWiki  REL1_22
FileRepoTest.php
Go to the documentation of this file.
00001 <?php
00002 
00003 class FileRepoTest extends MediaWikiTestCase {
00004 
00009     public function testFileRepoConstructionOptionCanNotBeNull() {
00010         new FileRepo();
00011     }
00012 
00017     public function testFileRepoConstructionOptionCanNotBeAnEmptyArray() {
00018         new FileRepo( array() );
00019     }
00020 
00025     public function testFileRepoConstructionOptionNeedNameKey() {
00026         new FileRepo( array(
00027             'backend' => 'foobar'
00028         ) );
00029     }
00030 
00035     public function testFileRepoConstructionOptionNeedBackendKey() {
00036         new FileRepo( array(
00037             'name' => 'foobar'
00038         ) );
00039     }
00040 
00044     public function testFileRepoConstructionWithRequiredOptions() {
00045         $f = new FileRepo( array(
00046             'name' => 'FileRepoTestRepository',
00047             'backend' => new FSFileBackend( array(
00048                 'name' => 'local-testing',
00049                 'lockManager' => 'nullLockManager',
00050                 'containerPaths' => array()
00051             ) )
00052         ) );
00053         $this->assertInstanceOf( 'FileRepo', $f );
00054     }
00055 }