Commit graph

10 commits

Author SHA1 Message Date
Platonides
31b34304a1 Need to set mDataLoaded so that this works without a db 2011-12-27 20:48:06 +00:00
Alexandre Emsenhuber
399b120152 Follow-up r105790: make tests work again 2011-12-11 13:29:21 +00:00
Aaron Schulz
cce7fcf367 For r91123:
* Moved generateReason() to WikiPage. This fixes the PureWikiDeletion ext too.
* Make Checkpoint ext call getRawText() as doEdit() does. Aalso, WikiPage doesn't have fetchContent().
* Call getAutosummary() statically in doEdit().
* Fixed outdated code comment.
* Fixed title used in unit test.
2011-09-07 17:55:37 +00:00
Chad Horohoe
af0eb3c320 rv r96424, Roan had his fun 2011-09-07 13:04:40 +00:00
Roan Kattouw
40aa026f48 Break some tests intentionally to see how Jenkins displays that 2011-09-07 12:48:51 +00:00
Platonides
905caba37d It is stupid to test that a void method returns null. Add a comment explaining that
what we are testing is actually the function existence (see r91123 summary)
Change the onArticle* to is_callable()s, so that a db is not needed.
2011-07-23 20:23:26 +00:00
Aaron Schulz
6a1aef21b6 Follow-up r91997, moved newFromTitle() function to WikiPage.php and renamed to factory(). This avoids an extra class. 2011-07-12 20:32:09 +00:00
Aaron Schulz
fe623a323b Added WikiPageFactory class with newFromTitle() function 2011-07-12 18:01:16 +00:00
Antoine Musso
2fad923859 split tests for ArticleTest 2011-07-03 17:51:11 +00:00
Aaron Schulz
930ccf282c * Split off WikiPage class from Article, WikiFilePage class from ImagePage, and WikiCategoryPage from CategoryPage.
* WikiPage functions/fields are "magically" part of Article when accessed for b/c. Magic is kind of ugly but there are too many callers to make breaking changes atm. Some functions are just wrappers for WikiPage ones (were magic won't work).
* Added newFromID() to each WikiPage subclass (works around pre-existing inheritance problem).
* Added Page class for convenient type hinting and changed hints from Article -> Page. This lets things use WikiPage objects without getting type errors.
* Updated FlaggedPage to extend WikiPage. Worked around getOldIdFromRequest().
* Added setTimestamp() to WikiPage and moved some timestamp setting code from ParserCache to Article.
* Removed ampersands from $dbw arguments.
* @TODO: dependency inject user objects for WikiPage

The idea is to migrate things to use WikiPage, as the run-of-the-mill "new Article()" call doesn't care about $oldid and $wgRequest. After that, Article, ImagePage, and CategoryPage can be rewritten as an Action class or something sane (a Viewer class of sorts).
2011-06-29 22:09:51 +00:00