test: coverage recording now needs to be explicit
[mediawiki.git] / tests / phpunit / includes / filerepo / FileRepoTest.php
blob033ae0b7120526f6f6d95f745c34d7815f3343d1
1 <?php
3 class FileRepoTest extends MediaWikiTestCase {
4 /**
5 * @expectedException MWException
6 */
7 function testFileRepoConstructionOptionCanNotBeNull() {
8 new FileRepo();
11 /**
12 * @expectedException MWException
14 function testFileRepoConstructionOptionCanNotBeAnEmptyArray() {
15 new FileRepo( array() );
18 /**
19 * @expectedException MWException
21 function testFileRepoConstructionOptionNeedNameKey() {
22 new FileRepo( array(
23 'backend' => 'foobar'
24 ) );
27 /**
28 * @expectedException MWException
30 function testFileRepoConstructionOptionNeedBackendKey() {
31 new FileRepo( array(
32 'name' => 'foobar'
33 ) );
36 function testFileRepoConstructionWithRequiredOptions() {
37 $f = new FileRepo( array(
38 'name' => 'FileRepoTestRepository',
39 'backend' => new FSFileBackend( array(
40 'name' => 'local-testing',
41 'lockManager' => 'nullLockManager',
42 'containerPaths' => array()
43 ) )
44 ) );
45 $this->assertInstanceOf( 'FileRepo', $f );