aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fakes/fake_dba.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-03-22 08:37:29 +0000
committerMario <mario@mariovavti.com>2024-03-22 08:37:29 +0000
commit1aeb05628b6a2a069c46980efbe628362c9e3e74 (patch)
treee9aed15d0cd74e0c23dcb05c7be8fe9541efdf36 /tests/fakes/fake_dba.php
parent5b7387459cf4de8f7354d81cb0392c4225714d94 (diff)
parentb464fae3bf22585888c5f3def8eded76fd48ed16 (diff)
downloadvolse-hubzilla-1aeb05628b6a2a069c46980efbe628362c9e3e74.tar.gz
volse-hubzilla-1aeb05628b6a2a069c46980efbe628362c9e3e74.tar.bz2
volse-hubzilla-1aeb05628b6a2a069c46980efbe628362c9e3e74.zip
Merge branch '9.0RC'9.0
Diffstat (limited to 'tests/fakes/fake_dba.php')
-rw-r--r--tests/fakes/fake_dba.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/fakes/fake_dba.php b/tests/fakes/fake_dba.php
new file mode 100644
index 000000000..2289f5c80
--- /dev/null
+++ b/tests/fakes/fake_dba.php
@@ -0,0 +1,18 @@
+<?php
+namespace Zotlabs\Tests\Fakes;
+
+require_once 'include/dba/dba_pdo.php';
+
+/**
+ * Fake dba_driver implementation.
+ *
+ * This is a subclass of the dba_pdo class, that essentially lets us inject a
+ * stub for the PDO class that is the actual database driver.
+ */
+class FakeDba extends \dba_pdo {
+ public function __construct($stub) {
+ $this->db = $stub;
+ $this->connected = true;
+ }
+}
+