예제 #1
0
 public function setUp()
 {
     parent::setUp();
     $this->searchController = $this->getMockBuilder('WikiaSearchController')->disableOriginalConstructor();
     $this->mockFactory = $this->getMockBuilder('Wikia\\Search\\QueryService\\Factory')->setMethods(array('get', 'getFromConfig'))->getMock();
     $this->mockClass('Wikia\\Search\\QueryService\\Factory', $this->mockFactory);
 }
예제 #2
0
 public function setUp()
 {
     parent::setUp();
     $this->pageId = 123;
     $this->service = $this->getMockBuilder('\\Wikia\\Search\\MediaWikiService')->disableOriginalConstructor();
     // re-initialize static vars
     $staticVars = array('pageIdsToArticles', 'pageIdsToTitles', 'redirectsToCanonicalIds', 'pageIdsToFiles', 'redirectArticles', 'wikiDataSources');
     foreach ($staticVars as $var) {
         $refl = new ReflectionProperty('Wikia\\Search\\MediaWikiService', $var);
         $refl->setAccessible(true);
         $refl->setValue(array());
     }
 }
예제 #3
0
 public function setUp()
 {
     parent::setUp();
     $this->service = $this->getMockBuilder('\\Wikia\\Search\\IndexService\\AbstractService');
 }
예제 #4
0
 public function setUp()
 {
     parent::setUp();
     $this->service = $this->getMockBuilder('\\Wikia\\Search\\MediaWikiService')->disableOriginalConstructor();
     $this->pageId = 123;
 }
예제 #5
0
 public function setUp()
 {
     $this->service = $this->getMockBuilder('\\Wikia\\Search\\MediaWikiService')->disableOriginalConstructor();
     $this->config = $this->getMockBuilder('\\Wikia\\Search\\Config')->disableOriginalConstructor();
     parent::setUp();
 }