class MockTestConnection

Same name in other branches
  1. 7.x modules/simpletest/tests/filetransfer.test \MockTestConnection
  2. 9 core/modules/system/tests/src/Functional/FileTransfer/MockTestConnection.php \Drupal\Tests\system\Functional\FileTransfer\MockTestConnection
  3. 8.9.x 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

1 file declares its use of MockTestConnection
FileTransferTest.php in core/modules/system/tests/src/Unit/FileTransfer/FileTransferTest.php

File

core/modules/system/tests/src/Functional/FileTransfer/MockTestConnection.php, line 10

Namespace

Drupal\Tests\system\Functional\FileTransfer
View source
class MockTestConnection {
    protected $commandsRun = [];
    public $connectionString;
    public function run($cmd) {
        $this->commandsRun[] = $cmd;
    }
    public function flushCommands() {
        $out = $this->commandsRun;
        $this->commandsRun = [];
        return $out;
    }

}

Members

Title Sort descending Modifiers Object type Summary
MockTestConnection::$commandsRun protected property
MockTestConnection::$connectionString public property
MockTestConnection::flushCommands public function
MockTestConnection::run public function

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