Merge "[search] Fix method call on null value"
[lhc/web/wiklou.git] / tests / phpunit / phpunit.php
index af924a0..aaa7751 100755 (executable)
@@ -42,14 +42,28 @@ class PHPUnitMaintClass extends Maintenance {
                        false, # not required
                        false # no arg needed
                );
-               $this->addOption( 'regex', 'Only run parser tests that match the given regex.', false, true );
+               $this->addOption(
+                       'regex',
+                       'Only run parser tests that match the given regex.',
+                       false,
+                       true
+               );
                $this->addOption( 'file', 'File describing parser tests.', false, true );
                $this->addOption( 'use-filebackend', 'Use filebackend', false, true );
                $this->addOption( 'use-bagostuff', 'Use bagostuff', false, true );
                $this->addOption( 'use-jobqueue', 'Use jobqueue', false, true );
-               $this->addOption( 'keep-uploads', 'Re-use the same upload directory for each test, don\'t delete it.', false, false );
+               $this->addOption(
+                       'keep-uploads',
+                       'Re-use the same upload directory for each test, don\'t delete it.',
+                       false,
+                       false
+               );
                $this->addOption( 'use-normal-tables', 'Use normal DB tables.', false, false );
-               $this->addOption( 'reuse-db', 'Init DB only if tables are missing and keep after finish.', false, false );
+               $this->addOption(
+                       'reuse-db', 'Init DB only if tables are missing and keep after finish.',
+                       false,
+                       false
+               );
        }
 
        public function finalSetup() {
@@ -99,6 +113,11 @@ class PHPUnitMaintClass extends Maintenance {
                );
                // xdebug's default of 100 is too low for MediaWiki
                ini_set( 'xdebug.max_nesting_level', 1000 );
+
+               // Bug T116683 serialize_precision of 100
+               // may break testing against floating point values
+               // treated with PHP's serialize()
+               ini_set( 'serialize_precision', 17 );
        }
 
        public function execute() {
@@ -114,7 +133,7 @@ class PHPUnitMaintClass extends Maintenance {
 
                # Make sure we have --configuration or PHPUnit might complain
                if ( !in_array( '--configuration', $_SERVER['argv'] ) ) {
-                       //Hack to eliminate the need to use the Makefile (which sucks ATM)
+                       // Hack to eliminate the need to use the Makefile (which sucks ATM)
                        array_splice( $_SERVER['argv'], 1, 0,
                                array( '--configuration', $IP . '/tests/phpunit/suite.xml' ) );
                }