MediaWiki  REL1_21
FileRepoTest.php
Go to the documentation of this file.
00001 <?php
00002 
00003 class FileRepoTest extends MediaWikiTestCase {
00004 
00008         function testFileRepoConstructionOptionCanNotBeNull() {
00009                 $f = new FileRepo();
00010         }
00011 
00015         function testFileRepoConstructionOptionCanNotBeAnEmptyArray() {
00016                 $f = new FileRepo( array() );
00017         }
00018 
00022         function testFileRepoConstructionOptionNeedNameKey() {
00023                 $f = new FileRepo( array(
00024                         'backend' => 'foobar'
00025                 ) );
00026         }
00027 
00031         function testFileRepoConstructionOptionNeedBackendKey() {
00032                 $f = new FileRepo( array(
00033                         'name' => 'foobar'
00034                 ) );
00035         }
00036 
00037         function testFileRepoConstructionWithRequiredOptions() {
00038                 $f = new FileRepo( array(
00039                         'name' => 'FileRepoTestRepository',
00040                         'backend' => new FSFileBackend( array(
00041                                 'name' => 'local-testing',
00042                                 'lockManager' => 'nullLockManager',
00043                                 'containerPaths' => array()
00044                         ) )
00045                 ) );
00046                 $this->assertInstanceOf( 'FileRepo', $f );
00047         }
00048 }