summaryrefslogtreecommitdiffstats
path: root/tests/mocks/libraries/driver.php
blob: 633194345ac88323ab9e72c982fe6026871c20a6 (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;
	}
}