From: Trevor Parscal Date: Tue, 7 Sep 2010 22:32:47 +0000 (+0000) Subject: Renaming phpunit to phpunit.php - this will make it possible to have a phpunit folder... X-Git-Tag: 1.31.0-rc.0~35107 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=90ef40d9c2dcaf7fb52adf25b5b8623944d6f8cc;p=lhc%2Fweb%2Fwiklou.git Renaming phpunit to phpunit.php - this will make it possible to have a phpunit folder here, yet doesn't break head. --- diff --git a/maintenance/tests/Makefile b/maintenance/tests/Makefile index ece423cf69..d489c24faa 100644 --- a/maintenance/tests/Makefile +++ b/maintenance/tests/Makefile @@ -8,16 +8,16 @@ TEST_FILE_TARGETS=$(subst .php,.target,$(TEST_FILES)) all test: phpunit phpunit: - php phpunit + php phpunit.php tap: - prove -e 'php phpunit --tap' *Test*.php + prove -e 'php phpunit.php --tap' *Test*.php separate: $(TEST_FILE_TARGETS) # Need --tap because without it, the target specification doesn't work $(TEST_FILE_TARGETS) : %.target : %.php - php phpunit --tap $< + php phpunit.php --tap $< install: pear channel-discover pear.phpunit.de diff --git a/maintenance/tests/phpunit b/maintenance/tests/phpunit deleted file mode 100755 index d38e016737..0000000000 --- a/maintenance/tests/phpunit +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env php -= 3.5 - require_once 'PHPUnit/Autoload.php'; -} else { - // Works for PHPUnit < 3.5 - require_once 'PHPUnit/TextUI/Command.php'; -} -define( 'MW_PHPUNIT_TEST', 1 ); - -$wgLocaltimezone = 'UTC'; - -/* Tests were failing with sqlite */ -global $wgCaches; -$wgCaches[CACHE_DB] = false; - -if ( !version_compare( PHPUnit_Runner_Version::id(), "3.4.1", ">" ) ) { - echo <<options[1] ) ) { - $files = $this->options[1]; - } else { - require( dirname( __FILE__ ) . '/TestFileList.php' ); - $files = $testFiles; - wfRunHooks( 'UnitTestsList', array( &$files ) ); - } - foreach ( $files as $file ) { - $suite->addTestFile( $file ); - } - $suite->setName( 'MediaWiki test suite' ); - $this->arguments['test'] = $suite; - } -} - -$command = new MWPHPUnitCommand; -$command->run( $argv ); - diff --git a/maintenance/tests/phpunit.php b/maintenance/tests/phpunit.php new file mode 100755 index 0000000000..d38e016737 --- /dev/null +++ b/maintenance/tests/phpunit.php @@ -0,0 +1,54 @@ +#!/usr/bin/env php += 3.5 + require_once 'PHPUnit/Autoload.php'; +} else { + // Works for PHPUnit < 3.5 + require_once 'PHPUnit/TextUI/Command.php'; +} +define( 'MW_PHPUNIT_TEST', 1 ); + +$wgLocaltimezone = 'UTC'; + +/* Tests were failing with sqlite */ +global $wgCaches; +$wgCaches[CACHE_DB] = false; + +if ( !version_compare( PHPUnit_Runner_Version::id(), "3.4.1", ">" ) ) { + echo <<options[1] ) ) { + $files = $this->options[1]; + } else { + require( dirname( __FILE__ ) . '/TestFileList.php' ); + $files = $testFiles; + wfRunHooks( 'UnitTestsList', array( &$files ) ); + } + foreach ( $files as $file ) { + $suite->addTestFile( $file ); + } + $suite->setName( 'MediaWiki test suite' ); + $this->arguments['test'] = $suite; + } +} + +$command = new MWPHPUnitCommand; +$command->run( $argv ); +