Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / tests / Drupal / Tests / Core / Database / fixtures / driver / fake / Connection.php
diff --git a/web/core/tests/Drupal/Tests/Core/Database/fixtures/driver/fake/Connection.php b/web/core/tests/Drupal/Tests/Core/Database/fixtures/driver/fake/Connection.php
new file mode 100644 (file)
index 0000000..377b0f3
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+
+namespace Drupal\Driver\Database\fake;
+
+use Drupal\Core\Database\Connection as CoreConnection;
+use Drupal\Core\Database\StatementEmpty;
+
+/**
+ * A fake Connection class for testing purposes.
+ */
+class Connection extends CoreConnection {
+
+  /**
+   * Public property so we can test driver loading mechanism.
+   *
+   * @var string
+   * @see driver().
+   */
+  public $driver = 'fake';
+
+  /**
+   * {@inheritdoc}
+   */
+  public function queryRange($query, $from, $count, array $args = [], array $options = []) {
+    return new StatementEmpty();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function queryTemporary($query, array $args = [], array $options = []) {
+    return '';
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function driver() {
+    return $this->driver;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function databaseType() {
+    return 'fake';
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function createDatabase($database) {
+    return;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function mapConditionOperator($operator) {
+    return NULL;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function nextId($existing_id = 0) {
+    return 0;
+  }
+
+}