Ejemplo n.º 1
0
 protected function fetchService(Input\InputInterface $input, Output\OutputInterface $output)
 {
     if (!$this->service) {
         $this->service = CodeGen\Service::create(array('schema_parser' => Parser\ModuleSchemaXmlParser::create(), 'output' => $output));
     }
     return $this->service;
 }
 public function testParseSchema()
 {
     $module_schema_path = __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR . 'extensive_module_example.xml';
     $parser = Parser\ModuleSchemaXmlParser::create();
     $module_schema = $parser->parseSchema($module_schema_path);
     $this->assertInstanceOf('\\Dat0r\\CodeGen\\Schema\\ModuleSchema', $module_schema);
 }
Ejemplo n.º 3
0
 public function testDeployMethodCopy()
 {
     $this->config->setDeployMethod(Config\IConfig::DEPLOY_COPY);
     $codegen_service = CodeGen\Service::create(array('config' => $this->config, 'schema_parser' => Parser\ModuleSchemaXmlParser::create()));
     $codegen_service->buildSchema($this->schema_path);
     $codegen_service->deployBuild();
     // @todo assert validity of the generated code inside the configured deploy directory.
 }