Beispiel #1
0
 private function getCommandTester($remote = false, $backup = [])
 {
     $this->container->getParameter('nanbando.storage.local_directory')->willReturn('/User/test/nanbando');
     $this->container->getParameter('nanbando.backup')->willReturn($backup);
     $this->container->hasParameter('nanbando.application.name')->willReturn(true);
     $this->container->getParameter('nanbando.application.name')->willReturn('sulu');
     $this->container->hasParameter('nanbando.application.version')->willReturn(true);
     $this->container->getParameter('nanbando.application.version')->willReturn('1.3');
     $this->container->hasParameter('nanbando.application.options')->willReturn(true);
     $this->container->getParameter('nanbando.application.options')->willReturn([]);
     $this->container->has('filesystem.remote')->willReturn($remote);
     $this->container->get('presets')->willReturn($this->presetStore->reveal());
     $this->container->get('plugins')->willReturn($this->plugins->reveal());
     $command = new CheckCommand();
     $command->setContainer($this->container->reveal());
     $application = new Application();
     $application->add($command);
     $command = $application->find('check');
     return new CommandTester($command);
 }
Beispiel #2
0
 protected function setUp()
 {
     $this->presetStore = $this->prophesize(PresetStore::class);
     $this->listener = new PresetListener($this->application, $this->version, $this->options, $this->presetStore->reveal());
 }