Пример #1
0
 protected function setUp()
 {
     $parser = new NeonConfigParser();
     $this->configuration = $parser->parse(__DIR__ . '/../../example/phoenix.neon');
     $cleanup = new CleanupCommand();
     $cleanup->setConfig($this->configuration);
     $cleanup->run(new Input(), new Output());
     $this->input = new Input();
     $this->output = new Output();
 }
Пример #2
0
 public function testOnlyFirstMigration()
 {
     $command = new MigrateCommand();
     $command->setConfig($this->configuration);
     $input = new Input();
     $input->setOption('first', true);
     $output = new Output();
     $command->run($input, $output);
     $messagesFirst = $output->getMessages();
     $command = new CleanupCommand();
     $command->setConfig($this->configuration);
     $command->run($this->input, $this->output);
     $command = new MigrateCommand();
     $command->setConfig($this->configuration);
     $input = new Input();
     $output = new Output();
     $command->run($input, $output);
     $messagesAll = $output->getMessages();
     $this->assertGreaterThan(count($messagesFirst[0]), count($messagesAll[0]));
 }