Mass conversion to SpecialPageFactory service
[lhc/web/wiklou.git] / tests / phpunit / includes / specials / SpecialSearchTest.php
index f0a5726..6ff2110 100644 (file)
@@ -231,7 +231,7 @@ class SpecialSearchTest extends MediaWikiTestCase {
 
                $ctx = new RequestContext;
                $sp = Title::newFromText( 'Special:Search/foo_bar' );
-               SpecialPageFactory::executePath( $sp, $ctx );
+               MediaWikiServices::getInstance()->getSpecialPageFactory()->executePath( $sp, $ctx );
                $url = $ctx->getOutput()->getRedirect();
                // some older versions of hhvm have a bug that doesn't parse relative
                // urls with a port, so help it out a little bit.
@@ -262,8 +262,8 @@ class SpecialSearchTestMockResultSet extends SearchResultSet {
                $this->containedSyntax = $containedSyntax;
        }
 
-       public function numRows() {
-               return count( $this->results );
+       public function expandResults() {
+               return $this->results;
        }
 
        public function getTotalHits() {