Merge "Http::getProxy() method to get proxy configuration"
[lhc/web/wiklou.git] / includes / context / RequestContext.php
index 63b4f71..c8b8108 100644 (file)
@@ -167,7 +167,7 @@ class RequestContext implements IContextSource, MutableContext {
         *
         * @param Title $title
         */
-       public function setTitle( Title $title ) {
+       public function setTitle( Title $title = null ) {
                $this->title = $title;
                // Erase the WikiPage so a new one with the new title gets created.
                $this->wikipage = null;
@@ -496,7 +496,7 @@ class RequestContext implements IContextSource, MutableContext {
         * Resets singleton returned by getMain(). Should be called only from unit tests.
         */
        public static function resetMain() {
-               if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
+               if ( !( defined( 'MW_PHPUNIT_TEST' ) || defined( 'MW_PARSER_TEST' ) ) ) {
                        throw new MWException( __METHOD__ . '() should be called only from unit tests!' );
                }
                self::$instance = null;