You are here

public function TestFileTransfer::connect in Drupal 9

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

Connects to the server.

Overrides FileTransfer::connect

File

core/modules/system/tests/src/Functional/FileTransfer/TestFileTransfer.php, line 31

Class

TestFileTransfer
Mock FileTransfer object for test case.

Namespace

Drupal\Tests\system\Functional\FileTransfer

Code

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