/**
  * @param TranslationServiceProvider $translationService
  * @param string                     $mode
  * @param array                      $languagePackPath one or few dirs
  *
  * @return array
  */
 protected function upload(TranslationServiceProvider $translationService, $mode, $languagePackPath)
 {
     if ('update' == $mode) {
         $translationService->update($languagePackPath);
     } else {
         $translationService->upload($languagePackPath);
     }
 }
Пример #2
0
 /**
  * Test upload method
  */
 public function testUpload()
 {
     $mode = 'add';
     $this->adapter->expects($this->once())->method('upload')->with($this->isType('array'), $mode);
     $this->service->setAdapter($this->adapter);
     $this->assertEquals($this->adapter, $this->service->getAdapter());
     $this->service->upload($this->getLangFixturesDir(), $mode);
 }