Merge "Add SPARQL client to core"
[lhc/web/wiklou.git] / tests / phpunit / includes / filerepo / RepoGroupTest.php
index 82ff12e..5a343f6 100644 (file)
@@ -1,4 +1,8 @@
 <?php
+
+/**
+ * @covers RepoGroup
+ */
 class RepoGroupTest extends MediaWikiTestCase {
 
        function testHasForeignRepoNegative() {
@@ -15,7 +19,7 @@ class RepoGroupTest extends MediaWikiTestCase {
 
        function testForEachForeignRepo() {
                $this->setUpForeignRepo();
-               $fakeCallback = $this->createMock( 'RepoGroupTestHelper' );
+               $fakeCallback = $this->createMock( RepoGroupTestHelper::class );
                $fakeCallback->expects( $this->once() )->method( 'callback' );
                RepoGroup::singleton()->forEachForeignRepo(
                        [ $fakeCallback, 'callback' ], [ [] ] );
@@ -25,7 +29,7 @@ class RepoGroupTest extends MediaWikiTestCase {
                $this->setMwGlobals( 'wgForeignFileRepos', [] );
                RepoGroup::destroySingleton();
                FileBackendGroup::destroySingleton();
-               $fakeCallback = $this->createMock( 'RepoGroupTestHelper' );
+               $fakeCallback = $this->createMock( RepoGroupTestHelper::class );
                $fakeCallback->expects( $this->never() )->method( 'callback' );
                RepoGroup::singleton()->forEachForeignRepo(
                        [ $fakeCallback, 'callback' ], [ [] ] );
@@ -34,7 +38,7 @@ class RepoGroupTest extends MediaWikiTestCase {
        private function setUpForeignRepo() {
                global $wgUploadDirectory;
                $this->setMwGlobals( 'wgForeignFileRepos', [ [
-                       'class' => 'ForeignAPIRepo',
+                       'class' => ForeignAPIRepo::class,
                        'name' => 'wikimediacommons',
                        'backend' => 'wikimediacommons-backend',
                        'apibase' => 'https://commons.wikimedia.org/w/api.php',