summaryrefslogtreecommitdiffstats
path: root/tests/stubs/wpdb_stub.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stubs/wpdb_stub.php')
-rw-r--r--tests/stubs/wpdb_stub.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/stubs/wpdb_stub.php b/tests/stubs/wpdb_stub.php
new file mode 100644
index 0000000..72312bc
--- /dev/null
+++ b/tests/stubs/wpdb_stub.php
@@ -0,0 +1,9 @@
+<?php
+class wpdb {
+ public $insert_id = NULL;
+ public function insert(string $table, array $data) { $this->insert_id = 1; }
+ public function prepare(string $query, mixed $args) { return "prepared"; }
+ public function get_results(string $query) { return NULL; }
+}
+
+$wpdb = new wpdb();