From 854b84ef429c7f59d6bd20a2907c5144c4b6deac Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 3 Jul 2011 18:09:30 +0000 Subject: [PATCH] enhance tests name (for --testdox option) --- tests/phpunit/includes/JsonTest.php | 2 +- .../includes/SiteConfigurationTest.php | 10 +++---- .../phpunit/includes/TitlePermissionTest.php | 2 +- .../includes/api/format/ApiFormatPhpTest.php | 3 ++- .../media/PNGMetadataExtractorTest.php | 26 +++++++++---------- tests/phpunit/languages/LanguageTest.php | 2 +- 6 files changed, 23 insertions(+), 22 deletions(-) diff --git a/tests/phpunit/includes/JsonTest.php b/tests/phpunit/includes/JsonTest.php index bec755db21..75dd18d52b 100644 --- a/tests/phpunit/includes/JsonTest.php +++ b/tests/phpunit/includes/JsonTest.php @@ -2,7 +2,7 @@ class JsonTest extends MediaWikiTestCase { - function testPHPBug46944Test() { + function testPhpBug46944Test() { $this->assertNotEquals( '\ud840\udc00', diff --git a/tests/phpunit/includes/SiteConfigurationTest.php b/tests/phpunit/includes/SiteConfigurationTest.php index 6ed30f2647..57d3532a5b 100644 --- a/tests/phpunit/includes/SiteConfigurationTest.php +++ b/tests/phpunit/includes/SiteConfigurationTest.php @@ -93,7 +93,7 @@ class SiteConfigurationTest extends MediaWikiTestCase { } - function testSiteFromDB() { + function testSiteFromDb() { $this->assertEquals( array( 'wikipedia', 'en' ), $this->mConf->siteFromDB( 'enwiki' ), @@ -126,7 +126,7 @@ class SiteConfigurationTest extends MediaWikiTestCase { ); } - function testGet() { + function testGetConfVariables() { $this->assertEquals( 'enwiki', $this->mConf->get( 'simple', 'enwiki', 'wiki' ), @@ -238,7 +238,7 @@ class SiteConfigurationTest extends MediaWikiTestCase { ); } - function testSiteFromDBWithCallback() { + function testSiteFromDbWithCallback() { $this->mConf->siteParamsCallback = 'getSiteParams'; $this->assertEquals( @@ -258,7 +258,7 @@ class SiteConfigurationTest extends MediaWikiTestCase { ); } - function testParamReplacement() { + function testParameterReplacement() { $this->mConf->siteParamsCallback = 'getSiteParams'; $this->assertEquals( @@ -288,7 +288,7 @@ class SiteConfigurationTest extends MediaWikiTestCase { ); } - function testGetAll() { + function testGetAllGlobals() { $this->mConf->siteParamsCallback = 'getSiteParams'; $getall = array( diff --git a/tests/phpunit/includes/TitlePermissionTest.php b/tests/phpunit/includes/TitlePermissionTest.php index 753709c5da..1b179686cf 100644 --- a/tests/phpunit/includes/TitlePermissionTest.php +++ b/tests/phpunit/includes/TitlePermissionTest.php @@ -384,7 +384,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase { $this->title->userCan( 'bogus' ) ); } - function testCSSandJSPermissions() { + function testCssAndJavascriptPermissions() { $this->setUser( $this->userName ); global $wgUser; $wgUser = $this->user; diff --git a/tests/phpunit/includes/api/format/ApiFormatPhpTest.php b/tests/phpunit/includes/api/format/ApiFormatPhpTest.php index f83ef184f2..8209f5910b 100644 --- a/tests/phpunit/includes/api/format/ApiFormatPhpTest.php +++ b/tests/phpunit/includes/api/format/ApiFormatPhpTest.php @@ -5,7 +5,8 @@ * @group Database */ class ApiFormatPhpTest extends ApiFormatTestBase { - function testValidPHPSyntax() { + + function testValidPhpSyntax() { $data = $this->apiRequest( 'php', array( 'action' => 'query', 'meta' => 'siteinfo' ) ); diff --git a/tests/phpunit/includes/media/PNGMetadataExtractorTest.php b/tests/phpunit/includes/media/PNGMetadataExtractorTest.php index 025127e3ce..db4e789d7e 100644 --- a/tests/phpunit/includes/media/PNGMetadataExtractorTest.php +++ b/tests/phpunit/includes/media/PNGMetadataExtractorTest.php @@ -3,7 +3,7 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase { /** * Tests zTXt tag (compressed textual metadata) */ - function testPNGNativetzTXt() { + function testPngNativetZtxt() { $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) . '/Png-native-test.png' ); $expected = "foo bar baz foo foo foo foof foo foo foo foo"; @@ -18,7 +18,7 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase { /** * Test tEXt tag (Uncompressed textual metadata) */ - function testPNGNativetEXt() { + function testPngNativeText() { $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) . '/Png-native-test.png' ); $expected = "Some long image desc"; @@ -35,7 +35,7 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase { * tEXt tags must be encoded iso-8859-1 (vs iTXt which are utf-8) * Make sure non-ascii characters get converted properly */ - function testPNGNativettEXtNonASCII() { + function testPngNativeTextNonAscii() { $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) . '/Png-native-test.png' ); @@ -56,7 +56,7 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase { /** * Test extraction of pHYs tags, which can tell what the * actual resolution of the image is (aka in dots per meter). - function testPNGpHYsTag () { + function testPngPhysTag () { $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) . '/Png-native-test.png' ); @@ -71,7 +71,7 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase { /** * Given a normal static PNG, check the animation metadata returned. */ - function testStaticPNGAnimationMetadata() { + function testStaticPngAnimationMetadata() { $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) . '/Png-native-test.png' ); @@ -84,7 +84,7 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase { * Given an animated APNG image file * check it gets animated metadata right. */ - function testAPNGAnimationMetadata() { + function testApngAnimationMetadata() { $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) . '/Animated_PNG_example_bouncing_beach_ball.png' ); @@ -94,41 +94,41 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase { $this->assertEquals( 1.5, $meta['duration'], '', 0.00001 ); } - function testPNGBitDepth8() { + function testPngBitDepth8() { $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) . '/Png-native-test.png' ); $this->assertEquals( 8, $meta['bitDepth'] ); } - function testPNGBitDepth1() { + function testPngBitDepth1() { $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) . '/1bit-png.png' ); $this->assertEquals( 1, $meta['bitDepth'] ); } - function testPNGindexColour() { + function testPngIndexColour() { $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) . '/Png-native-test.png' ); $this->assertEquals( 'index-coloured', $meta['colorType'] ); } - function testPNGrgbColour() { + function testPngRgbColour() { $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) . '/rgb-png.png' ); $this->assertEquals( 'truecolour-alpha', $meta['colorType'] ); } - function testPNGrgbNoAlphaColour() { + function testPngRgbNoAlphaColour() { $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) . '/rgb-na-png.png' ); $this->assertEquals( 'truecolour', $meta['colorType'] ); } - function testPNGgreyscaleColour() { + function testPngGreyscaleColour() { $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) . '/greyscale-png.png' ); $this->assertEquals( 'greyscale-alpha', $meta['colorType'] ); } - function testPNGgreyscaleNoAlphaColour() { + function testPngGreyscaleNoAlphaColour() { $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) . '/greyscale-na-png.png' ); $this->assertEquals( 'greyscale', $meta['colorType'] ); diff --git a/tests/phpunit/languages/LanguageTest.php b/tests/phpunit/languages/LanguageTest.php index 34baea8b8a..aaad9c318e 100644 --- a/tests/phpunit/languages/LanguageTest.php +++ b/tests/phpunit/languages/LanguageTest.php @@ -147,7 +147,7 @@ class LanguageTest extends MediaWikiTestCase { /** * @dataProvider provideHTMLTruncateData() */ - function testTruncateHTML( $len, $ellipsis, $input, $expected ) { + function testTruncateHtml( $len, $ellipsis, $input, $expected ) { // Actual HTML... $this->assertEquals( $expected, -- 2.20.1