Пример #1
0
 public function __construct(GinnyInput $input, OutputInterface $output)
 {
     $this->input = $input;
     $this->output = $output;
     $this->target = $input->getFullTargetPath();
     $this->template = $input->getFullTemplatePath();
     $this->schema = $input->getFullSchemaPath();
     $this->map = $this->map();
     //s($this->map->dump());
     //exit;
     $this->loadTwig();
 }
Пример #2
0
 /**
  * @covers \Foote\Ginny\Command\GinnyInput::getFullTargetPath
  */
 public function testgetFullTargetPath()
 {
     $yaml = new \Symfony\Component\Yaml\Parser();
     $local_defaults = $yaml->parse(file_get_contents(__DIR__ . '/../configs/default.yml'));
     $local_defaults['root'] = __DIR__ . '/../../';
     $input = new GinnyInput($local_defaults, ['-t' => 'test/target/path/']);
     $input->bind(new GinnyDefinition());
     $this->assertEquals($local_defaults['root'] . 'test/target/path/', $input->getFullTargetPath());
 }