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); }
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()); } }
public function setUp() { parent::setUp(); $this->service = $this->getMockBuilder('\\Wikia\\Search\\IndexService\\AbstractService'); }
public function setUp() { parent::setUp(); $this->service = $this->getMockBuilder('\\Wikia\\Search\\MediaWikiService')->disableOriginalConstructor(); $this->pageId = 123; }
public function setUp() { $this->service = $this->getMockBuilder('\\Wikia\\Search\\MediaWikiService')->disableOriginalConstructor(); $this->config = $this->getMockBuilder('\\Wikia\\Search\\Config')->disableOriginalConstructor(); parent::setUp(); }