Addshore has uploaded a new change for review.
https://gerrit.wikimedia.org/r/118730
Change subject: Remove assignment in conditon in phpunit.php
......................................................................
Remove assignment in conditon in phpunit.php
Change-Id: I817af3cf5344d9ffe2a66048f6d32835712ba11c
---
M tests/phpunit/phpunit.php
1 file changed, 4 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/30/118730/1
diff --git a/tests/phpunit/phpunit.php b/tests/phpunit/phpunit.php
index 039cabb..1aa2b4d 100755
--- a/tests/phpunit/phpunit.php
+++ b/tests/phpunit/phpunit.php
@@ -6,8 +6,6 @@
* @file
*/
-/* Configuration */
-
// Set a flag which can be used to detect when other scripts have been entered
through this entry point or not
define( 'MW_PHPUNIT_TEST', true );
@@ -16,7 +14,7 @@
class PHPUnitMaintClass extends Maintenance {
- function __construct() {
+ public function __construct() {
parent::__construct();
$this->addOption( 'with-phpunitdir',
'Directory to include PHPUnit from, for example when
using a git fetchout from upstream. Path will be prepended to PHP
`include_path`.',
@@ -72,7 +70,8 @@
}
# --with-phpunitdir let us override the default PHPUnit version
- if ( $phpunitDir = $this->getOption( 'with-phpunitdir' ) ) {
+ if ( $this->hasOption( 'with-phpunitdir' ) ) {
+ $phpunitDir = $this->getOption( 'with-phpunitdir' );
# Sanity checks
if ( !is_dir( $phpunitDir ) ) {
$this->error( "--with-phpunitdir should be set
to an existing directory", 1 );
@@ -83,8 +82,7 @@
# Now prepends provided PHPUnit directory
$this->output( "Will attempt loading PHPUnit from
`$phpunitDir`\n" );
- set_include_path( $phpunitDir
- . PATH_SEPARATOR . get_include_path() );
+ set_include_path( $phpunitDir . PATH_SEPARATOR .
get_include_path() );
# Cleanup $args array so the option and its value do not
# pollute PHPUnit
--
To view, visit https://gerrit.wikimedia.org/r/118730
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I817af3cf5344d9ffe2a66048f6d32835712ba11c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits