/**
  * @When /^I use refactoring "([^"]*)" with:$/
  */
 public function iUseRefactoringWith($refactoringName, TableNode $table)
 {
     vfsStream::create($this->structure, $this->root);
     $data = array('command' => $refactoringName);
     foreach ($table->getHash() as $line) {
         $data[$line['arg']] = $line['value'];
     }
     if (isset($data['file'])) {
         $data['file'] = vfsStream::url('project/' . $data['file']);
     }
     if (isset($data['dir'])) {
         $data['dir'] = vfsStream::url('project/' . $data['dir']);
     }
     $data['--verbose'] = true;
     $fh = fopen("php://memory", "rw");
     $input = new ArrayInput($data);
     $output = new \Symfony\Component\Console\Output\StreamOutput($fh);
     $app = new CliApplication();
     $app->setAutoExit(false);
     $app->run($input, $output);
     rewind($fh);
     $this->output = stream_get_contents($fh);
 }