Example #1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $configPath = $this->getConfigPath($input->getOption('config'));
     $config = $this->readConfigFile($configPath);
     $config = $this->fixOutputFormat($config);
     $this->config = $this->amendAndValidateConfig($config);
     $schema = Schema::make($this->config);
     $createStatements = $schema->getCreateStatements();
     file_put_contents($this->config['output_file'], $createStatements);
 }
Example #2
0
 /**
  * @covers ::getCreateStatements
  *
  * @expectedException \Kicaj\Schema\SchemaException
  * @expectedExceptionMessage unknown format: unknown
  */
 public function test_getCreateStatements_unknown()
 {
     $this->schema->getCreateStatements('unknown');
 }