Add @covers tags for more tests
[mediawiki.git] / tests / phpunit / includes / filerepo / FileRepoTest.php
blobb760e26b69d2068b28db581a04a984add03018f0
1 <?php
3 class FileRepoTest extends MediaWikiTestCase {
5 /**
6 * @expectedException MWException
7 * @covers FileRepo::__construct
8 */
9 function testFileRepoConstructionOptionCanNotBeNull() {
10 new FileRepo();
13 /**
14 * @expectedException MWException
15 * @covers FileRepo::__construct
17 function testFileRepoConstructionOptionCanNotBeAnEmptyArray() {
18 new FileRepo( array() );
21 /**
22 * @expectedException MWException
23 * @covers FileRepo::__construct
25 function testFileRepoConstructionOptionNeedNameKey() {
26 new FileRepo( array(
27 'backend' => 'foobar'
28 ) );
31 /**
32 * @expectedException MWException
33 * @covers FileRepo::__construct
35 function testFileRepoConstructionOptionNeedBackendKey() {
36 new FileRepo( array(
37 'name' => 'foobar'
38 ) );
41 /**
42 * @covers FileRepo::__construct
44 function testFileRepoConstructionWithRequiredOptions() {
45 $f = new FileRepo( array(
46 'name' => 'FileRepoTestRepository',
47 'backend' => new FSFileBackend( array(
48 'name' => 'local-testing',
49 'lockManager' => 'nullLockManager',
50 'containerPaths' => array()
51 ) )
52 ) );
53 $this->assertInstanceOf( 'FileRepo', $f );