You are here

public function TestFileTransfer::connect in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/FileTransfer/TestFileTransfer.php \Drupal\system\Tests\FileTransfer\TestFileTransfer::connect()

Connects to the server.

Overrides FileTransfer::connect

File

core/modules/system/src/Tests/FileTransfer/TestFileTransfer.php, line 35
Contains \Drupal\system\Tests\FileTransfer\TestFileTransfer.

Class

TestFileTransfer
Mock FileTransfer object for test case.

Namespace

Drupal\system\Tests\FileTransfer

Code

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