예제 #1
0
파일: ExportCmd.php 프로젝트: rzajac/schema
 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);
 }
예제 #2
0
 /**
  * @covers ::getCreateStatements
  *
  * @expectedException \Kicaj\Schema\SchemaException
  * @expectedExceptionMessage unknown format: unknown
  */
 public function test_getCreateStatements_unknown()
 {
     $this->schema->getCreateStatements('unknown');
 }