summaryrefslogtreecommitdiffstats
path: root/tests/mocks/libraries/driver.php
blob: 91bb015962fc4a062bd43e3e786343a18d62bac8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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;
	}
}