Commit graph

51 commits

Author SHA1 Message Date
Alexandre Emsenhuber
33459ee889 fixes in the tests directory:
* create default object to avoid PHP notices in ArticleTest
* remove broken constructor in SearchMySQL4Test
* remove pass by ref to avoid PHP warnings in SearchEngineTest
2009-07-30 15:59:04 +00:00
Aryeh Gregor
d20794df5c Make Database into abstract class DatabaseBase
All other databases were changed to extend DatabaseBase instead of
Database.  Database was kept as an alias for DatabaseMysql for
compatibility.  Existing explicit references to Database that I could
find were changed to DatabaseMysql for the sake of clarity.

Should cause no functional changes.
2009-06-12 17:59:04 +00:00
Chad Horohoe
f90895676f As brought up in bug 16374, the parserTests seem to only want parsertest_ as the dbprefix. If we're going to do that, lets make the PHPUnit tests consistent and use the same test prefix. 2008-11-25 20:39:05 +00:00
Brion Vibber
5d5142eedb Revert r36033 -- this is for the stub mode output, which does indeed use that. And yes, I'm aware it doesn't match the schema, which is really meant for the final output, not the stub output. 2008-06-09 17:20:16 +00:00
Bryan Tong Minh
89f8d588c8 Current MediaWiki does not appear to use the id attribute of <text /> anymore. Also not allowed by the XML schema. 2008-06-08 17:27:47 +00:00
Ævar Arnfjörð Bjarmason
76c07388ef this has been replaced by t/inc/Sanitizer.t 2007-07-20 00:15:12 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Tim Starling
85fa7504e6 * Split off ultimate base class FileRepo from FSRepo
* Use rawurlencode() for paths instead of urlencode()
* Moved functionality of LocalFile::loadFromFile() to a public static function. This allows Special:Upload to entirely avoid loading metadata from the (potentially remote) store. Changed purgeMetadataCache() to use loadFromDB() instead of loadFromFile().
* Redefined private virtual URLs, giving them a repo name component instead of a host.
* Moved is_writable($wgUploadDirectory) in SpecialUpload.php to the repo
* Added some filename validation to the FSRepo's store/publish
* Changed store and publish to use relative destinations instead of absolute, as was documented
* Deprecated File::recordUpload()! Now use upload() to do both publish and record. Moved the UI bits to SpecialUpload.
* Create a null revision on reupload
* Changed most of the member variable names in UploadForm. $this->mUpload followed by some ambiguous word or abbreviation was not a good naming convention. Also did some reformatting and assorted code cleanup.
2007-06-16 02:55:25 +00:00
Tim Starling
cc56119796 Fixed some errant double-slashes appearing in file paths. Added unit tests for the path and URL functions. 2007-06-11 14:46:18 +00:00
Brion Vibber
571975aa02 LocalTestSettings.php not used no mo 2007-06-06 20:46:38 +00:00
Brion Vibber
1bf3f2493e Update test cases to run 2007-06-06 18:37:35 +00:00
Tim Starling
ed4303922f Merged filerepo-work branch:
* Added support for configuration of an arbitrary number of commons-style file repositories.
* Split Image.php into filerepo/File.php and filerepo/LocalFile.php
* Renamed Image::getImagePath() to File::getPath()
* Added initial support for timestamp-based file fetching (OldLocalFile), to be expanded upon by aaron.
* Changed the interface for Image/File object creation: use wfFindFile() or wfLocalFile() depending on semantics
* ImageGallery::add() now accepts a title object as the first parameter
* Moved file handling operations on upload from SpecialUpload to File
* Removed path-related functions from ImageFunctions.php. Removed static path accessors from File. 
* Added a Content-Disposition header to thumb.php output
* Improved thumb.php error handling
* Updated the unit test suite to kind of partially work with modern computers. RunTests.php doesn't work just yet. Fixed an actual regression that the test suite detected -- moved some defines to Defines.php where they will be loaded consistently.
2007-05-30 21:02:32 +00:00
Antoine Musso
41a3400f91 tests:
* now detect when PHPUnit.php is missing
* tweak some require calls
2007-05-20 15:19:28 +00:00
Antoine Musso
389fd9e9b8 Fix #9332 : fix instructions in tests/README 2007-05-18 21:45:01 +00:00
Rotem Liss
0be256bcba Changing all the last references from LanguageUtf8 to Language, and finally removing it. 2006-08-06 14:23:53 +00:00
Antoine Musso
93154120cc Remove forced dereferencements (new() returns a reference in PHP5) 2006-07-11 14:11:23 +00:00
Brion Vibber
908c51e127 Revert to r15092; massive breakage, unable to connect to MySQL at all 2006-06-27 16:11:47 +00:00
Greg Sabino Mullane
ef89ec541c Add concept of a distinct port separate from a server.
Add some functions to DatabasePostgres.php.
2006-06-27 15:37:35 +00:00
Greg Sabino Mullane
43971b69a0 Final "postgres" name changes. 2006-06-27 15:09:50 +00:00
Brion Vibber
3bbf7dcbd2 Remove .cvsignore files 2006-04-05 08:23:27 +00:00
Brion Vibber
4a35e23d99 Copying .cvsignore and testing commit messages 2006-04-01 12:43:13 +00:00
Brion Vibber
678e2ff6f8 removing tests for unnecessary, removed dupe of php's ctype functions 2006-03-27 22:59:18 +00:00
Brion Vibber
a230979d98 * (bug 5062) Width sometimes one pixel short when using maximum heights 2006-02-27 08:38:57 +00:00
Ævar Arnfjörð Bjarmason
b42ac97c91 * ctype tests 2006-01-20 22:52:21 +00:00
Ævar Arnfjörð Bjarmason
396c28ee51 * This requires ../includes/Hooks.php 2006-01-20 22:51:10 +00:00
Ævar Arnfjörð Bjarmason
368a5106fa * set_include_path() in case of a custom PHPTest install
* Run ctype tests
2006-01-20 22:50:47 +00:00
Ævar Arnfjörð Bjarmason
89dda00bdf * Added options to install phpunit for the lazy 2006-01-20 22:49:07 +00:00
Brion Vibber
68f8fd1769 * (bug 4679) Work around buggy basename() function in PHP5, which breaks
uploads of files starting with multibyte characters on Linux.
  wfBaseName() doesn't suffer this bug, and understands backslash on
  both Unix and Windows.
2006-01-20 09:03:16 +00:00
Brion Vibber
266d41f165 * Added wfDie() wrapper, and some manual die(-1), to force the return code
to the shell to return nonzero when we crap out with an error.
2006-01-14 02:49:43 +00:00
Ævar Arnfjörð Bjarmason
a26d5a49d7 * s~\t+$~~ 2006-01-07 13:31:29 +00:00
Brion Vibber
189d24ef2d Test case files and fixes for text-prefetch two-and-a-half-pass dump.
Will want to test a little more before making another dump. :P
2005-10-19 00:05:22 +00:00
Brion Vibber
b1a49e2d5b Drop MySQL 3.23.x support; 4.0 or greater required. 2005-08-26 23:02:54 +00:00
Brion Vibber
af2177edfd Code cleanup: normalize case for intval(), strval(), floatval() calls. 2005-08-16 23:36:16 +00:00
Antoine Musso
7248fb2437 phpdoc 2005-08-11 00:24:17 +00:00
Antoine Musso
c076414231 Sample files for noobs like me. 2005-07-19 09:36:54 +00:00
Brion Vibber
fe40fe9da8 * Replace wfMungeToUtf8 and do_html_entity_decode with a single function
that does both numeric and named chars: Sanitizer::decodeCharReferences
* Removed some obsolete UTF-8 converter functions
2005-05-31 11:54:36 +00:00
Brion Vibber
e19a4391b5 * (bug 2178) Use TMPDIR, TMP, or TEMP environment variable for temp dir
before trying /tmp; new wfTempDir() function to centralize this
* Fix parser test database usage; runs on a single connection again by not
creating new LoadBalancer instances all the time
2005-05-15 10:37:56 +00:00
Magnus Manske
9b2a769a0e moving geo files to new experiments subdir 2005-01-13 16:12:25 +00:00
Magnus Manske
637d4870ed geo updates 2005-01-13 16:00:44 +00:00
Magnus Manske
f148eb9fea Added geo.php 2005-01-12 13:09:27 +00:00
Brion Vibber
2b1127fe90 Start splitting back-end functions from the Article user-interface class.
Fix Special:Export for new schema.
2004-12-19 12:21:29 +00:00
Brion Vibber
64ac6b8e77 Merge SCHEMA_WORK into HEAD. Lots of changes, some things are probably broken:
* Page moves/overwrites are a little iffy
* Compression might not be working right
* Profit!
2004-12-19 08:00:50 +00:00
Brion Vibber
6f5f83f05d Hide tests from web. Probably harmless, but safer to keep it out. 2004-12-03 08:42:27 +00:00
Brion Vibber
58401c4fdf Make sure wfProfileIn is available for testing, in case some silly function uses it 2004-11-23 05:28:06 +00:00
Brion Vibber
e1ef8b49c7 Sort results before comparison, as search is not guaranteed to return results in a particular result. 2004-10-28 02:01:57 +00:00
Brion Vibber
cfd54324d9 Add initial tests for Article::getRevisionText and Article::compressRevision 2004-10-23 09:19:00 +00:00
Brion Vibber
8ffff3e2e0 Reorganization of SearchEngine for legibility
* Removed 'fuzzy title search', it's not been maintained and generally produces unexpected and unwanted results
* Separated search guts (in SearchEngine) from display/control (in SpecialSearch)
* Extracted MySQL3 and MySQL4 variants to subclasses
* Added PHPUnit tests for MySQL3 and MySQL4 search engines, which try to use temporary tables to fiddle in (if configured)
* comments n stuff
2004-10-20 09:56:34 +00:00
Brion Vibber
8e9174f253 Add more globals tests 2004-10-19 08:38:08 +00:00
Brion Vibber
963901c8dd * Drop a couple instances of wfTimestamp2Unix & reverse for wfTimestamp()
* Make wfTimestampNow() a wrapper on wfTimestamp()
* Add some tests and docstrings
2004-10-19 07:12:15 +00:00
Brion Vibber
27ba25bf40 * Start on some unit tests for GlobalFunctions
* Add makefile & readme for the lazy
2004-10-18 09:53:47 +00:00