X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FSampleTest.php;h=3d74ae3efcb7431f1c83193d92ab2317745ca965;hp=31eebe3c0ea9a16be0e229e69fce619fd38703a9;hb=a2c8c2969420a0f150c03f76e3a0bf9028fcda43;hpb=6bd1e23f4a281b05e6c171653a715c394aac36d6 diff --git a/tests/phpunit/includes/SampleTest.php b/tests/phpunit/includes/SampleTest.php index 31eebe3c0e..3d74ae3efc 100644 --- a/tests/phpunit/includes/SampleTest.php +++ b/tests/phpunit/includes/SampleTest.php @@ -36,7 +36,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 ); @@ -57,12 +57,12 @@ class SampleTest extends MediaWikiLangTestCase { ]; } - // @codingStandardsIgnoreStart Generic.Files.LineLength /** + * phpcs:disable Generic.Files.LineLength * @dataProvider provideTitles * See https://phpunit.de/manual/3.7/en/appendixes.annotations.html#appendixes.annotations.dataProvider + * phpcs:enable */ - // @codingStandardsIgnoreEnd public function testCreateBasicListOfTitles( $titleName, $ns, $text ) { $title = Title::newFromText( $titleName, $ns ); $this->assertEquals( $text, "$title", "see if '$titleName' matches '$text'" ); @@ -95,12 +95,10 @@ class SampleTest extends MediaWikiLangTestCase { $this->assertTrue( $title->isLocal() ); } - // @codingStandardsIgnoreStart Generic.Files.LineLength /** * @expectedException InvalidArgumentException * See https://phpunit.de/manual/3.7/en/appendixes.annotations.html#appendixes.annotations.expectedException */ - // @codingStandardsIgnoreEnd public function testTitleObjectFromObject() { $title = Title::newFromText( Title::newFromText( "test" ) ); $this->assertEquals( "Test", $title->isLocal() );