Commit graph

6 commits

Author SHA1 Message Date
daniel
cbc2014b2d Use integers for content_model and content_format.
Representing content_model and content_format as integers in the
database was suggested by Asher mainly to save space.

This change entails some refactoring and renaming, but no big
change in logic.
2012-05-14 10:22:52 +02:00
daniel
db596107a4 spaces -> tabs 2012-04-26 12:11:34 +02:00
daniel
ce4a6e26ea reset namespace caches when testing extra namespace handling 2012-04-26 12:11:01 +02:00
daniel
57cf7bd82c more tests for Title 2012-04-19 12:55:46 +02:00
daniel
e02f9b1706 first test cases. found and fixed a bug in Title::isCssJsSubpage 2012-04-18 15:02:21 +02:00
Daniel Friesen
3414e91bae Implement a number of namespace related equals functions:
* MWNamespace::equals to test equivalence of two namespaces (forward compatible with any changes we may make like introducing namespace keys like 'USER')
* MWNamespace::subjectEquals to test equivalence of the subject of two namespaces e.g.: MWNamespace::subjectEquals( NS_USER, $ns ); instead of testing for equivalence to both NS_USER and NS_USER_TALK
* Title::inNamespace to use instead of $title->getNamespace() == NS_???
* Title::inNamespaces for use like $title->inNamespaces( NS_USER, NS_PROJECT ) when you only care if it's in one of a number of namespaces (also accepts an array)
* Title::hasSubjectNamespace for use instead of testing for equivalence to both the subject and talk such as NS_USER and NS_USER_TALK.

Include phpunit tests for all this new code, and also add some tests for some existing code.
2011-11-22 13:34:55 +00:00