X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fphpunit%2Fincludes%2Ffilerepo%2FFileRepoTest.php;h=0d3e679aa8aded23d74a7785db6584cb9b41595e;hb=3f1142045f;hp=e3a755673d9324ead232a3b830fd24782a9c84f8;hpb=0182f3fb638750850b7a34018730e77f2fffd048;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/filerepo/FileRepoTest.php b/tests/phpunit/includes/filerepo/FileRepoTest.php index e3a755673d..0d3e679aa8 100644 --- a/tests/phpunit/includes/filerepo/FileRepoTest.php +++ b/tests/phpunit/includes/filerepo/FileRepoTest.php @@ -15,7 +15,7 @@ class FileRepoTest extends MediaWikiTestCase { * @covers FileRepo::__construct */ public function testFileRepoConstructionOptionCanNotBeAnEmptyArray() { - new FileRepo( array() ); + new FileRepo( [] ); } /** @@ -23,9 +23,9 @@ class FileRepoTest extends MediaWikiTestCase { * @covers FileRepo::__construct */ public function testFileRepoConstructionOptionNeedNameKey() { - new FileRepo( array( + new FileRepo( [ 'backend' => 'foobar' - ) ); + ] ); } /** @@ -33,23 +33,23 @@ class FileRepoTest extends MediaWikiTestCase { * @covers FileRepo::__construct */ public function testFileRepoConstructionOptionNeedBackendKey() { - new FileRepo( array( + new FileRepo( [ 'name' => 'foobar' - ) ); + ] ); } /** * @covers FileRepo::__construct */ public function testFileRepoConstructionWithRequiredOptions() { - $f = new FileRepo( array( + $f = new FileRepo( [ 'name' => 'FileRepoTestRepository', - 'backend' => new FSFileBackend( array( + 'backend' => new FSFileBackend( [ 'name' => 'local-testing', - 'lockManager' => 'nullLockManager', - 'containerPaths' => array() - ) ) - ) ); - $this->assertInstanceOf( 'FileRepo', $f ); + 'wikiId' => 'test_wiki', + 'containerPaths' => [] + ] ) + ] ); + $this->assertInstanceOf( FileRepo::class, $f ); } }