From: C. Scott Ananian Date: Tue, 3 Jun 2014 19:44:53 +0000 (-0400) Subject: ParserTests: fix `bits` column in uploaded images for test cases. X-Git-Tag: 1.31.0-rc.0~15477^2 X-Git-Url: http://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=dece73dff9f8f4100865faa68bc3070ffec6e269;p=lhc%2Fweb%2Fwiklou.git ParserTests: fix `bits` column in uploaded images for test cases. When running parser tests on a sqlite3 database, the insertion of the djvu image before running the test suite will fail because `NULL` is not a valid value for the `bits` column of the `image` table. This will cause the test suite to eventually fail, since {{NUMBEROFFILES}} differs. Test uploads show that `bits` is usually set to 0 for both SVG and DJVU uploads, so fix this (in both the standalone test runner and the phpunit test runner). Change-Id: I8689a547d34035534723e87c4c2680c4e67245f2 --- diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc index c886011214..7e7c42ffce 100644 --- a/tests/parser/parserTest.inc +++ b/tests/parser/parserTest.inc @@ -1007,7 +1007,7 @@ class ParserTest { 'size' => 12345, 'width' => 240, 'height' => 180, - 'bits' => 24, + 'bits' => 0, 'media_type' => MEDIATYPE_DRAWING, 'mime' => 'image/svg+xml', 'metadata' => serialize( array() ), @@ -1035,6 +1035,7 @@ class ParserTest { 'size' => 3249, 'width' => 2480, 'height' => 3508, + 'bits' => 0, 'media_type' => MEDIATYPE_BITMAP, 'mime' => 'image/vnd.djvu', 'metadata' => ' diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php index e82439a424..d322e47212 100644 --- a/tests/phpunit/includes/parser/NewParserTest.php +++ b/tests/phpunit/includes/parser/NewParserTest.php @@ -277,7 +277,7 @@ class NewParserTest extends MediaWikiTestCase { 'size' => 12345, 'width' => 240, 'height' => 180, - 'bits' => 24, + 'bits' => 0, 'media_type' => MEDIATYPE_DRAWING, 'mime' => 'image/svg+xml', 'metadata' => serialize( array() ), @@ -293,7 +293,7 @@ class NewParserTest extends MediaWikiTestCase { 'size' => 3249, 'width' => 2480, 'height' => 3508, - 'bits' => 24, + 'bits' => 0, 'media_type' => MEDIATYPE_BITMAP, 'mime' => 'image/vnd.djvu', 'metadata' => '