class MockTestConnection

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/src/Functional/FileTransfer/MockTestConnection.php \Drupal\Tests\system\Functional\FileTransfer\MockTestConnection
  2. 9 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;
  }

}

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