Version 1
[yaffs-website] / web / core / modules / system / tests / src / Functional / FileTransfer / MockTestConnection.php
diff --git a/web/core/modules/system/tests/src/Functional/FileTransfer/MockTestConnection.php b/web/core/modules/system/tests/src/Functional/FileTransfer/MockTestConnection.php
new file mode 100644 (file)
index 0000000..029e72c
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+
+namespace Drupal\Tests\system\Functional\FileTransfer;
+
+/**
+ * Mock connection object for test case.
+ */
+class MockTestConnection {
+
+  protected $commandsRun = [];
+  public $connectionString;
+
+  public function run($cmd) {
+    $this->commandsRun[] = $cmd;
+  }
+
+  public function flushCommands() {
+    $out = $this->commandsRun;
+    $this->commandsRun = [];
+    return $out;
+  }
+
+}