Exemplo n.º 1
0
 protected function setUp()
 {
     $this->pluginRegistry = $this->prophesize(PluginRegistry::class);
     $this->listener = new BackupListener($this->pluginRegistry->reveal());
     $this->database = $this->prophesize(Database::class);
     $this->event = $this->prophesize(BackupEvent::class);
     $this->event->getDatabase()->willReturn($this->database->reveal());
 }
Exemplo n.º 2
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);
 }
Exemplo n.º 3
0
 protected function setUp()
 {
     $this->pluginRegistry = $this->prophesize(PluginRegistry::class);
     $this->listener = new RestoreListener($this->pluginRegistry->reveal());
     $this->event = $this->prophesize(RestoreEvent::class);
 }