MockTestConnection example


  public $shouldIsDirectoryReturnTrue = FALSE;

  public static function factory($jail$settings) {
    assert(is_array($settings));
    return new TestFileTransfer($jail);
  }

  public function connect() {
    $connection = new MockTestConnection();
    $connection->connectionString = 'test://' . urlencode($this->username) . ':' . urlencode($this->password) . "@$this->host:$this->port/";
    $this->connection = $connection;
  }

  public function copyFileJailed($source$destination) {
    $this->connection->run("copyFile $source $destination");
  }

  protected function removeDirectoryJailed($directory) {
    $this->connection->run("rmdir $directory");
  }

  
Home | Imprint | This part of the site doesn't use cookies.