r91378 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91377‎ | r91378 | r91379 >
Date:18:09, 3 July 2011
Author:hashar
Status:ok
Tags:
Comment:
enhance tests name (for --testdox option)
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/JsonTest.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/SiteConfigurationTest.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/TitlePermissionTest.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/api/format/ApiFormatPhpTest.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/media/PNGMetadataExtractorTest.php (modified) (history)
  • /trunk/phase3/tests/phpunit/languages/LanguageTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/api/format/ApiFormatPhpTest.php
@@ -5,7 +5,8 @@
66 * @group Database
77 */
88 class ApiFormatPhpTest extends ApiFormatTestBase {
9 - function testValidPHPSyntax() {
 9+
 10+ function testValidPhpSyntax() {
1011
1112 $data = $this->apiRequest( 'php', array( 'action' => 'query', 'meta' => 'siteinfo' ) );
1213
Index: trunk/phase3/tests/phpunit/includes/media/PNGMetadataExtractorTest.php
@@ -3,7 +3,7 @@
44 /**
55 * Tests zTXt tag (compressed textual metadata)
66 */
7 - function testPNGNativetzTXt() {
 7+ function testPngNativetZtxt() {
88 $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) .
99 '/Png-native-test.png' );
1010 $expected = "foo bar baz foo foo foo foof foo foo foo foo";
@@ -18,7 +18,7 @@
1919 /**
2020 * Test tEXt tag (Uncompressed textual metadata)
2121 */
22 - function testPNGNativetEXt() {
 22+ function testPngNativeText() {
2323 $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) .
2424 '/Png-native-test.png' );
2525 $expected = "Some long image desc";
@@ -35,7 +35,7 @@
3636 * tEXt tags must be encoded iso-8859-1 (vs iTXt which are utf-8)
3737 * Make sure non-ascii characters get converted properly
3838 */
39 - function testPNGNativettEXtNonASCII() {
 39+ function testPngNativeTextNonAscii() {
4040 $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) .
4141 '/Png-native-test.png' );
4242
@@ -56,7 +56,7 @@
5757 /**
5858 * Test extraction of pHYs tags, which can tell what the
5959 * actual resolution of the image is (aka in dots per meter).
60 - function testPNGpHYsTag () {
 60+ function testPngPhysTag () {
6161 $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) .
6262 '/Png-native-test.png' );
6363
@@ -71,7 +71,7 @@
7272 /**
7373 * Given a normal static PNG, check the animation metadata returned.
7474 */
75 - function testStaticPNGAnimationMetadata() {
 75+ function testStaticPngAnimationMetadata() {
7676 $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) .
7777 '/Png-native-test.png' );
7878
@@ -84,7 +84,7 @@
8585 * Given an animated APNG image file
8686 * check it gets animated metadata right.
8787 */
88 - function testAPNGAnimationMetadata() {
 88+ function testApngAnimationMetadata() {
8989 $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) .
9090 '/Animated_PNG_example_bouncing_beach_ball.png' );
9191
@@ -94,41 +94,41 @@
9595 $this->assertEquals( 1.5, $meta['duration'], '', 0.00001 );
9696 }
9797
98 - function testPNGBitDepth8() {
 98+ function testPngBitDepth8() {
9999 $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) .
100100 '/Png-native-test.png' );
101101
102102 $this->assertEquals( 8, $meta['bitDepth'] );
103103 }
104 - function testPNGBitDepth1() {
 104+ function testPngBitDepth1() {
105105 $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) .
106106 '/1bit-png.png' );
107107 $this->assertEquals( 1, $meta['bitDepth'] );
108108 }
109109
110110
111 - function testPNGindexColour() {
 111+ function testPngIndexColour() {
112112 $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) .
113113 '/Png-native-test.png' );
114114
115115 $this->assertEquals( 'index-coloured', $meta['colorType'] );
116116 }
117 - function testPNGrgbColour() {
 117+ function testPngRgbColour() {
118118 $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) .
119119 '/rgb-png.png' );
120120 $this->assertEquals( 'truecolour-alpha', $meta['colorType'] );
121121 }
122 - function testPNGrgbNoAlphaColour() {
 122+ function testPngRgbNoAlphaColour() {
123123 $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) .
124124 '/rgb-na-png.png' );
125125 $this->assertEquals( 'truecolour', $meta['colorType'] );
126126 }
127 - function testPNGgreyscaleColour() {
 127+ function testPngGreyscaleColour() {
128128 $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) .
129129 '/greyscale-png.png' );
130130 $this->assertEquals( 'greyscale-alpha', $meta['colorType'] );
131131 }
132 - function testPNGgreyscaleNoAlphaColour() {
 132+ function testPngGreyscaleNoAlphaColour() {
133133 $meta = PNGMetadataExtractor::getMetadata( dirname( __FILE__ ) .
134134 '/greyscale-na-png.png' );
135135 $this->assertEquals( 'greyscale', $meta['colorType'] );
Index: trunk/phase3/tests/phpunit/includes/SiteConfigurationTest.php
@@ -93,7 +93,7 @@
9494 }
9595
9696
97 - function testSiteFromDB() {
 97+ function testSiteFromDb() {
9898 $this->assertEquals(
9999 array( 'wikipedia', 'en' ),
100100 $this->mConf->siteFromDB( 'enwiki' ),
@@ -126,7 +126,7 @@
127127 );
128128 }
129129
130 - function testGet() {
 130+ function testGetConfVariables() {
131131 $this->assertEquals(
132132 'enwiki',
133133 $this->mConf->get( 'simple', 'enwiki', 'wiki' ),
@@ -238,7 +238,7 @@
239239 );
240240 }
241241
242 - function testSiteFromDBWithCallback() {
 242+ function testSiteFromDbWithCallback() {
243243 $this->mConf->siteParamsCallback = 'getSiteParams';
244244
245245 $this->assertEquals(
@@ -258,7 +258,7 @@
259259 );
260260 }
261261
262 - function testParamReplacement() {
 262+ function testParameterReplacement() {
263263 $this->mConf->siteParamsCallback = 'getSiteParams';
264264
265265 $this->assertEquals(
@@ -288,7 +288,7 @@
289289 );
290290 }
291291
292 - function testGetAll() {
 292+ function testGetAllGlobals() {
293293 $this->mConf->siteParamsCallback = 'getSiteParams';
294294
295295 $getall = array(
Index: trunk/phase3/tests/phpunit/includes/JsonTest.php
@@ -2,7 +2,7 @@
33
44 class JsonTest extends MediaWikiTestCase {
55
6 - function testPHPBug46944Test() {
 6+ function testPhpBug46944Test() {
77
88 $this->assertNotEquals(
99 '\ud840\udc00',
Index: trunk/phase3/tests/phpunit/includes/TitlePermissionTest.php
@@ -384,7 +384,7 @@
385385 $this->title->userCan( 'bogus' ) );
386386 }
387387
388 - function testCSSandJSPermissions() {
 388+ function testCssAndJavascriptPermissions() {
389389 $this->setUser( $this->userName );
390390 global $wgUser;
391391 $wgUser = $this->user;
Index: trunk/phase3/tests/phpunit/languages/LanguageTest.php
@@ -147,7 +147,7 @@
148148 /**
149149 * @dataProvider provideHTMLTruncateData()
150150 */
151 - function testTruncateHTML( $len, $ellipsis, $input, $expected ) {
 151+ function testTruncateHtml( $len, $ellipsis, $input, $expected ) {
152152 // Actual HTML...
153153 $this->assertEquals(
154154 $expected,

Status & tagging log