Esempio n. 1
0
 protected function setUp()
 {
     $this->configuration = new Configuration('localhost');
     $this->auth = new Password(TEST_USER, TEST_PASSWORD);
     $this->session = new Session($this->configuration, $this->auth);
     $this->sftp = $this->session->getSftp();
     $this->createFixtures();
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 public function download($local, $remote)
 {
     $this->checkConnection();
     if (!$this->session->getSftp()->receive($remote, $local)) {
         throw new \RuntimeException('Can not download file.');
     }
 }