https://bugzilla.wikimedia.org/show_bug.cgi?id=20077
Dan Nessett <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6443 is|0 |1 obsolete| | --- Comment #7 from Dan Nessett <[email protected]> 2009-08-10 16:07:39 UTC --- Created an attachment (id=6451) --> (https://bugzilla.wikimedia.org/attachment.cgi?id=6451) modifed patch to fix bugs and add --runall option to run-test.php Patch tests-dir3.patch fixes the bugs described in this bug ticket. It modifies the changes contained in testsPatch.patch and all others (superceded by this patch) according to the review in comment #1 of this ticket. The patch is merged, diffed and tested against r54724. The following changes are made: * all PHPUnit tests (specifically, ArticleTest.php, DatabaseTest.php, GlobalTest.php, ImageFunctionsTest.php, LocalFileTest.php and SearchMySQL4Test.php) are moved to the sub-directory /PHPUnitTests/ of the directory /tests/. The patch makes corresponding changes to run-test.php and some test files so they operate correctly out of this directory. * run-test.php: rolled back change in testsPatch.patch that required setting the directory to the PHPUnit directory. Tests in the tests directory assume this directory is accessible, e.g., it is one of the include_path directories set in php.ini. Added a --help command line option and a --runall option. The latter allows run-test to execute all PHPUnit tests in the .../tests/PHPUnitTests/ directory. In order to utilize this option and satisfy other constraints (see below for discussion) the patch renames SearchEngineTest.php to SearchEngineTest.inc, retaining it in the /tests/ directory. This makes sense since SearchEngineTest.inc contains only an abstract class, not directly executable code. The patch adds SearchEngineTest.inc and deletes SearchEngineTest.php from the distribution. Finally, the patch modifies the help text to reflect the new directory organization of /tests/. * ArticleTest.php: fixed bug related to backing up global variables that may not exist. Tests for global variable existence before attempting to save it for later restoration. * LocalFileTest.php: fixed bug related to a change in the directory structure used to store thumbnails in file based repositories. * MediaWiki_TestCase.php: fixed bug that wrote over $wgDBprefix, causing creation of test tables to fail. Tested code for both MySQL version >= 4.1 and < 4.1 (by creating temporary debug version of if statement - tests occured using MySQL version 5.0.41). Rolled back the change in testsPatch.patch that changed the name of the global variables $wgDBadminuser (-> $wgDBuser) and $wgDBadminpassword (->$wgDBpassword). The patch assumes these are set in LocalSettings.php. * README: Updated so it describes the new PHPUnitTests directory and explains use of the new --runall option. * SearchEngineTest.php: renamed to SearchEngineTest.inc and retained in the /tests/ directory so algorithm in run-tests.php that automatically finds all PHPUnit tests works. * SearchMySQL4Test: renamed 'SearchEngineTest.php' to 'SearchEngineTest.inc' in require_once() call. * Makefile: added LocalFileTest.php to the all/test target. Commented out install and clean targets (which attempted to install and remove PHPUnit from the installation) and their explanation in the help text. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
