wiki.techinc.nl/tests/phpunit/includes/filerepo/FileRepoTest.php
Siebrand Mazeland 483e29277f Remove unused local variables in tests
Change-Id: I71318eb7d8c00bfc1ce6d2fc636b498f7a695f42
2013-04-26 09:48:46 +02:00

47 lines
973 B
PHP

<?php
class FileRepoTest extends MediaWikiTestCase {
/**
* @expectedException MWException
*/
function testFileRepoConstructionOptionCanNotBeNull() {
new FileRepo();
}
/**
* @expectedException MWException
*/
function testFileRepoConstructionOptionCanNotBeAnEmptyArray() {
new FileRepo( array() );
}
/**
* @expectedException MWException
*/
function testFileRepoConstructionOptionNeedNameKey() {
new FileRepo( array(
'backend' => 'foobar'
) );
}
/**
* @expectedException MWException
*/
function testFileRepoConstructionOptionNeedBackendKey() {
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 );
}
}