function TestFileTransfer::connect
7.x filetransfer.test | TestFileTransfer::connect() |
Connect to the server.
Overrides FileTransfer::connect
File
- drupal-7.x/
modules/ simpletest/ tests/ filetransfer.test, line 113
Class
- TestFileTransfer
- Mock FileTransfer object for test case.
Code
function connect() {
$parts = explode(':', $this->hostname);
$port = (count($parts) == 2) ? $parts[1] : $this->port;
$this->connection = new MockTestConnection();
$this->connection->connectionString = 'test://' . urlencode($this->username) . ':' . urlencode($this->password) . "@$this->host:$this->port/";
}