Exemplo n.º 1
0
 /**
  *
  * @return \OCA\EasyBackup\IRunnable
  */
 private function getRunnable()
 {
     if (!$this->runnable) {
         $app = new Application();
         $this->runnable = $app->getContainer()->query('ShellExecRunnable');
     }
     return $this->runnable;
 }
 private function getContainer()
 {
     if (!$this->container) {
         $app = new Application();
         $this->container = $app->getContainer();
     }
     return $this->container;
 }
Exemplo n.º 3
0
 protected function setUp()
 {
     $app = new Application();
     $this->container = $app->getContainer();
     $this->requestMock = $requestMock = $this->getMock('\\OCP\\IRequest');
     $this->container->registerService('Request', function ($c) use($requestMock) {
         return $requestMock;
     });
     $this->loggerMock = $loggerMock = $this->getMock('\\OCP\\ILogger');
     $this->container->registerService('Logger', function ($c) use($loggerMock) {
         return $loggerMock;
     });
     $this->translationMock = $translationMock = $this->getMock('\\OCP\\IL10N');
     $this->container->registerService('TranslationService', function ($c) use($translationMock) {
         return $translationMock;
     });
     $this->responseFactoryMock = $responseFactoryMock = $this->getMock('\\OCA\\EasyBackup\\ResponseFactory');
     $this->container->registerService('ResponseFactory', function ($c) use($responseFactoryMock) {
         return $responseFactoryMock;
     });
 }