summaryrefslogtreecommitdiffstats
path: root/tests/mocks/libraries/driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-25 14:07:35 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-25 14:07:35 +0100
commit89ecc8a1c69bed3451d43d3f0a367f4e498d1b80 (patch)
tree91abfa8346b81a3b98ae567f5c7c608b1dc3394d /tests/mocks/libraries/driver.php
parentade05b40714070bcda7ab32187068e95b98c8cf8 (diff)
parent6262d053db57957c4445ef7fce76070854c3e30d (diff)
Merge pull request #2029 from dchill42/driver_ext
Added driver extension support
Diffstat (limited to 'tests/mocks/libraries/driver.php')
-rw-r--r--tests/mocks/libraries/driver.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/mocks/libraries/driver.php b/tests/mocks/libraries/driver.php
new file mode 100644
index 000000000..91bb01596
--- /dev/null
+++ b/tests/mocks/libraries/driver.php
@@ -0,0 +1,27 @@
+<?php
+
+/**
+ * Mock library to subclass Driver for testing
+ */
+class Mock_Libraries_Driver extends CI_Driver_Library {
+ /**
+ * Set valid drivers list
+ */
+ public function driver_list($drivers = NULL)
+ {
+ if (empty($drivers))
+ {
+ return $this->valid_drivers;
+ }
+
+ $this->valid_drivers = (array) $drivers;
+ }
+
+ /**
+ * Get library name
+ */
+ public function get_name()
+ {
+ return $this->lib_name;
+ }
+}