/** * @desc Generic method re-used in other methods to load a file as array * * @see StyleguideComponents::loadComponentDocumentationAsArray() * @see StyleguideComponents::loadComponentSampleAsArray() * * @param String $filePath full path to a file * @return Array */ private function loadFileAsArray($filePath) { wfProfileIn(__METHOD__); $fileContent = $this->uiFactory->loadFileContent($filePath); $inArray = $this->uiFactory->loadFromJSON($fileContent); wfProfileOut(__METHOD__); return $inArray; }
public function testInitalizationAndSingleton() { $instanceB = Wikia\UI\Factory::getInstance(); $this->assertEquals($this->instance, $instanceB); }