Merge "GlobalFunctions: Enable patch-coverage for wfExpandUrl test"
[lhc/web/wiklou.git] / tests / phpunit / includes / SampleTest.php
index c0930e3..22495d0 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
+/**
+ * @coversNothing Just a sample
+ */
 class SampleTest extends MediaWikiLangTestCase {
 
        /**
@@ -13,9 +16,8 @@ class SampleTest extends MediaWikiLangTestCase {
 
                // This sets the globals and will restore them automatically
                // after each test.
+               $this->setContentLang( 'en' );
                $this->setMwGlobals( [
-                       'wgContLang' => Language::factory( 'en' ),
-                       'wgLanguageCode' => 'en',
                        'wgCapitalLinks' => true,
                ] );
        }
@@ -36,7 +38,7 @@ class SampleTest extends MediaWikiLangTestCase {
         */
        public function testTitleObjectStringConversion() {
                $title = Title::newFromText( "text" );
-               $this->assertInstanceOf( 'Title', $title, "Title creation" );
+               $this->assertInstanceOf( Title::class, $title, "Title creation" );
                $this->assertEquals( "Text", $title, "Automatic string conversion" );
 
                $title = Title::newFromText( "text", NS_MEDIA );