/** * @covers Mage_Selenium_Helper_File::loadYamlFiles * @depends test__construct */ public function testLoadYamlFiles() { $fileHelper = new Mage_Selenium_Helper_File($this->_config); $filePath = SELENIUM_TESTS_BASEDIR . DIRECTORY_SEPARATOR . 'fixture' . DIRECTORY_SEPARATOR . 'default' . DIRECTORY_SEPARATOR . '*' . DIRECTORY_SEPARATOR . '*' . DIRECTORY_SEPARATOR . '*' . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . '*.yml'; $allYmlData = $fileHelper->loadYamlFiles($filePath); $this->assertInternalType('array', $allYmlData); $this->assertNotEmpty($allYmlData); $this->assertGreaterThanOrEqual(25, count($allYmlData)); $this->assertEmpty($fileHelper->loadYamlFiles('')); $this->assertEmpty($fileHelper->loadYamlFiles('*.yml')); }
/** * Load and merge data files * * @param string $area Application area ('frontend'|'admin') * * @return Mage_Selenium_TestConfiguration */ protected function _loadUimapData($area) { $files = SELENIUM_TESTS_BASEDIR . DIRECTORY_SEPARATOR . 'uimaps' . DIRECTORY_SEPARATOR . $area . DIRECTORY_SEPARATOR . '*.yml'; $pages = $this->_fileHelper->loadYamlFiles($files); foreach ($pages as $pageKey => $pageContent) { if (!empty($pageContent)) { $this->_uimapData[$area][$pageKey] = new Mage_Selenium_Uimap_Page($pageKey, $pageContent); } } return $this; }