r101480 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101479‎ | r101480 | r101481 >
Date:15:09, 1 November 2011
Author:hashar
Status:ok (Comments)
Tags:
Comment:
(bug 32022) phpunit.php can not execute from another directory

Adds tests/phpunit to the include_path to let PHPUnit find out our files.
Also add to change the suite.xml paths from './path' to 'path' so
stream_resolve_path() correctly find out the suite by using include_path
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php (modified) (history)
  • /trunk/phase3/tests/phpunit/suite.xml (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/suite.xml
@@ -12,19 +12,19 @@
1313 verbose="true">
1414 <testsuites>
1515 <testsuite name="includes">
16 - <directory>./includes</directory>
 16+ <directory>includes</directory>
1717 </testsuite>
1818 <testsuite name="languages">
19 - <directory>./languages</directory>
 19+ <directory>languages</directory>
2020 </testsuite>
2121 <testsuite name="skins">
22 - <directory>./skins</directory>
 22+ <directory>skins</directory>
2323 </testsuite>
2424 <testsuite name="uploadfromurl">
25 - <file>./suites/UploadFromUrlTestSuite.php</file>
 25+ <file>suites/UploadFromUrlTestSuite.php</file>
2626 </testsuite>
2727 <testsuite name="extensions">
28 - <file>./suites/ExtensionsTestSuite.php</file>
 28+ <file>suites/ExtensionsTestSuite.php</file>
2929 </testsuite>
3030 </testsuites>
3131 <groups>
Index: trunk/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php
@@ -28,6 +28,17 @@
2929 # Probably fix bug 29226
3030 $command->arguments['colors'] = false;
3131 }
 32+
 33+ # Makes MediaWiki PHPUnit directory includable so the PHPUnit will
 34+ # be able to resolve relative files inclusion such as suites/*
 35+ # PHPUnit uses stream_resolve_include_path() internally
 36+ # See bug 32022
 37+ set_include_path(
 38+ dirname( __FILE__ )
 39+ .PATH_SEPARATOR
 40+ . get_include_path()
 41+ );
 42+
3243 $command->run($_SERVER['argv'], $exit);
3344 }
3445
Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -123,6 +123,7 @@
124124 * (bug 19186) Special:UserLogin's title on Special:SpecialPages now says
125125 "create account" when the user cannot create an account
126126 * (bug 31818) 'usercreated' message now supports GENDER
 127+* (bug 32022) Our phpunit.php script can now be executed from another directory
127128
128129 === API changes in 1.19 ===
129130 * (bug 19838) siprop=interwikimap can now use the interwiki cache.

Follow-up revisions

RevisionCommit summaryAuthorDate
r101489space to tab...hashar16:00, 1 November 2011

Comments

#Comment by 😂 (talk | contribs)   15:15, 1 November 2011

Mix of spaces/tabs in MediaWikiPHPUnitCommand.

#Comment by Hashar (talk | contribs)   16:01, 1 November 2011

fixed the space to a tab in r101489

Status & tagging log