blob: 7cc25b1bc6370452efce618061090de82d312a9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<?php
class FileRepoTest extends MediaWikiTestCase {
/**
* @expectedException MWException
*/
function testFileRepoConstructionOptionCanNotBeNull() {
$f = new FileRepo();
}
/**
* @expectedException MWException
*/
function testFileRepoConstructionOptionCanNotBeAnEmptyArray() {
$f = new FileRepo( array() );
}
/**
* @expectedException MWException
*/
function testFileRepoConstructionOptionNeedNameKey() {
$f = new FileRepo( array(
'backend' => 'foobar'
) );
}
/**
* @expectedException MWException
*/
function testFileRepoConstructionOptionNeedBackendKey() {
$f = new FileRepo( array(
'name' => 'foobar'
) );
}
function testFileRepoConstructionWithRequiredOptions() {
$f = new FileRepo( array(
'name' => 'FileRepoTestRepository',
'backend' => new FSFileBackend( array(
'name' => 'local-testing',
'lockManager' => 'nullLockManager',
'containerPaths' => array()
) )
) );
$this->assertInstanceOf( 'FileRepo', $f );
}
}
|