Esempio n. 1
0
 /**
  * Sets up the fixture, for example, open a network connection.
  * This method is called before a test is executed.
  *
  */
 protected function setUp()
 {
     parent::setUp();
     $this->prepareFolder();
     $this->inputMock = $this->getMock(InputInterface::class);
     $this->inputMock->expects($this->any())->method('isInteractive')->will($this->returnValue(true));
     $this->outputMock = $this->getMock(OutputInterface::class);
     $this->publisherScanner = new PublisherScanner();
     $this->publisherScanner->registerTypeHandler('php', \Dubpub\Publisher\Handlers\PHPHandler::class);
     $this->publisherScanner->registerTypeHandler('json', \Dubpub\Publisher\Handlers\JSONHandler::class);
     $this->publisherScanner->registerTypeHandler('ini', \Dubpub\Publisher\Handlers\INIHandler::class);
     $yamlHandler = new \Dubpub\Publisher\Handlers\YAMLHandler(new \Symfony\Component\Yaml\Parser(), new \Symfony\Component\Yaml\Dumper());
     $this->publisherScanner->registerTypeHandler('yml', $yamlHandler);
     $this->publisherScanner->registerTypeHandler('yaml', $yamlHandler);
     $this->testInstance = $this->getCommand($this->publisherScanner);
 }