/** * Generate Blocks */ public function launch() { $this->startFactory($this->type); $this->generateContent(); $this->endFactory($this->type); \Mtf\Util\Generate\GenerateResult::addResult($this->type, $this->cnt); }
/** * Generate Fixtures Classes * * @return bool */ public function generateClasses() { $this->cnt = 0; $configuration = $this->configReader->read('constraint'); foreach ($configuration as $name => $item) { $this->generateClass($name, $item); } \Mtf\Util\Generate\GenerateResult::addResult('Constraint Classes', $this->cnt); }
/** * Generate Handlers * * @return bool */ protected function generateHandlers() { $this->cnt = 0; $configuration = $this->configReader->read('fixture'); foreach ($configuration as $name => $item) { $this->generateInterface($name, $item); $this->generateCurl($name, $item); $this->generateUi($name, $item); } \Mtf\Util\Generate\GenerateResult::addResult('Handlers', $this->cnt); }
<?php /** * {license_notice} * * @copyright {copyright} * @license {license_link} */ umask(0); $mtfRoot = dirname(dirname(__DIR__)); $mtfRoot = str_replace('\\', '/', $mtfRoot); define('MTF_BP', $mtfRoot); include_once $mtfRoot . '/bootstrap.php'; $path = get_include_path(); $path = rtrim($path, PATH_SEPARATOR); $path .= PATH_SEPARATOR . MTF_BP; $path .= PATH_SEPARATOR . MTF_BP . '/lib'; set_include_path($path); $objectManager = \Mtf\ObjectManagerFactory::getObjectManager(); /** @var $generate \Mtf\Util\Generate\Page */ $generate = $objectManager->get('Mtf\\Util\\Generate\\Page'); $generate->launch(); \Mtf\Util\Generate\GenerateResult::displayResults();
/** * Generate Pages Classes * @return void */ public function generateClasses() { $this->cnt = 0; $pagesXml = $this->collectPagesXml(); $pages = $this->mergePagesXml($pagesXml); foreach ($pages as $page) { $this->generatePageClass($page); } \Mtf\Util\Generate\GenerateResult::addResult('Page Classes', $this->cnt); }
/** * Generate Test Cases Classes * * @return void */ public function generateClasses() { $this->cnt = 0; $xmlObject = simplexml_load_file(__DIR__ . '/testcase.xml'); foreach ($xmlObject as $item) { /** @var $item \SimpleXMLElement */ $this->generateTestCaseClass($item); } \Mtf\Util\Generate\GenerateResult::addResult('Test Case Classes', $this->cnt); }
/** * Generate Repositories Classes * * @return void */ protected function generateClasses() { $this->cnt = 0; $items = $this->collectRepositoriesXml(); foreach ($items as $item) { $this->generateClass($item); } \Mtf\Util\Generate\GenerateResult::addResult('Repository Classes', $this->cnt); }