class MockTestConnection

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/FileTransfer/MockTestConnection.php \Drupal\Tests\system\Functional\FileTransfer\MockTestConnection
  2. 8.9.x core/modules/system/tests/src/Functional/FileTransfer/MockTestConnection.php \Drupal\Tests\system\Functional\FileTransfer\MockTestConnection
  3. 10 core/modules/system/tests/src/Functional/FileTransfer/MockTestConnection.php \Drupal\Tests\system\Functional\FileTransfer\MockTestConnection
  4. 11.x core/modules/system/tests/src/Functional/FileTransfer/MockTestConnection.php \Drupal\Tests\system\Functional\FileTransfer\MockTestConnection

Mock connection object for test case.

Hierarchy

Expanded class hierarchy of MockTestConnection

File

modules/simpletest/tests/filetransfer.test, line 155

View source
class MockTestConnection {
    var $commandsRun = array();
    var $connectionString;
    function run($cmd) {
        $this->commandsRun[] = $cmd;
    }
    function flushCommands() {
        $out = $this->commandsRun;
        $this->commandsRun = array();
        return $out;
    }

}

Members


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.