From: Timo Tijhof Date: Thu, 21 Feb 2013 23:58:19 +0000 (+0100) Subject: phpcs: Naming of GlobalFunctions tests classes. X-Git-Tag: 1.31.0-rc.0~20595^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=66cea66a681403372c8e7c288a608be361eee5b3;p=lhc%2Fweb%2Fwiklou.git phpcs: Naming of GlobalFunctions tests classes. Code convensions: Class names should be UpperCamelCase. And for PHPUnit: Class name should end in 'Test'. Class name should match file name. Also made headers and spacing a bit more consistent. Change-Id: Id7b6cec7e552240de44386b4759b57c2d37a39d1 --- diff --git a/tests/phpunit/includes/GlobalFunctions/wfAssembleUrlTest.php b/tests/phpunit/includes/GlobalFunctions/wfAssembleUrlTest.php index 21fff68403..4bd8c6852a 100644 --- a/tests/phpunit/includes/GlobalFunctions/wfAssembleUrlTest.php +++ b/tests/phpunit/includes/GlobalFunctions/wfAssembleUrlTest.php @@ -1,9 +1,8 @@ assertEquals( __METHOD__, wfGetCaller( 1 ) ); @@ -11,7 +11,7 @@ class wfGetCaller extends MediaWikiTestCase { } function testOne() { - $this->assertEquals( "wfGetCaller::testOne", self::callerOne() ); + $this->assertEquals( 'WfGetCallerTest::testOne', self::callerOne() ); } function intermediateFunction( $level = 2, $n = 0 ) { @@ -22,14 +22,14 @@ class wfGetCaller extends MediaWikiTestCase { } function testTwo() { - $this->assertEquals( "wfGetCaller::testTwo", self::intermediateFunction() ); + $this->assertEquals( 'WfGetCallerTest::testTwo', self::intermediateFunction() ); } function testN() { - $this->assertEquals( "wfGetCaller::testN", self::intermediateFunction( 2, 0 ) ); - $this->assertEquals( "wfGetCaller::intermediateFunction", self::intermediateFunction( 1, 0 ) ); + $this->assertEquals( 'WfGetCallerTest::testN', self::intermediateFunction( 2, 0 ) ); + $this->assertEquals( 'WfGetCallerTest::intermediateFunction', self::intermediateFunction( 1, 0 ) ); for ( $i = 0; $i < 10; $i++ ) - $this->assertEquals( "wfGetCaller::intermediateFunction", self::intermediateFunction( $i + 1, $i ) ); + $this->assertEquals( 'WfGetCallerTest::intermediateFunction', self::intermediateFunction( $i + 1, $i ) ); } } diff --git a/tests/phpunit/includes/GlobalFunctions/wfRemoveDotSegmentsTest.php b/tests/phpunit/includes/GlobalFunctions/wfRemoveDotSegmentsTest.php index af784bdea0..67861eebc5 100644 --- a/tests/phpunit/includes/GlobalFunctions/wfRemoveDotSegmentsTest.php +++ b/tests/phpunit/includes/GlobalFunctions/wfRemoveDotSegmentsTest.php @@ -1,9 +1,8 @@ assertEquals( diff --git a/tests/phpunit/includes/GlobalFunctions/wfShorthandToIntegerTest.php b/tests/phpunit/includes/GlobalFunctions/wfShorthandToIntegerTest.php index da6c936460..9d66d6b96f 100644 --- a/tests/phpunit/includes/GlobalFunctions/wfShorthandToIntegerTest.php +++ b/tests/phpunit/includes/GlobalFunctions/wfShorthandToIntegerTest.php @@ -1,6 +1,6 @@ wfUrlencode() + * Tests for wfUrlencode() * * The function only need a string parameter and might react to IIS7.0 */ - -class wfUrlencodeTest extends MediaWikiTestCase { +class WfUrlencodeTest extends MediaWikiTestCase { #### TESTS ############################################################## /** @dataProvider provideURLS */