Added tests for outagedb class - #1

This commit is contained in:
Daniel Thee Roperto
2016-09-01 16:40:47 +10:00
parent 44f826fd68
commit b9b6077ce4
2 changed files with 168 additions and 3 deletions

View File

@@ -30,14 +30,14 @@ use Box\Spout\Common\Exception\InvalidArgumentException;
final class outagedb
{
/**
* @var Singleton reference created on first use.
* @var outagedb Singleton reference created on first use.
*/
private static $singleton = null;
/**
* Returns the singleton instance.
*
* @return The singleton object.
* @return outagedb The singleton object.
*/
public static function get() {
if (is_null(self::$singleton)) {
@@ -138,7 +138,8 @@ final class outagedb
/**
* Deletes an outage from the database.
*
* @param $id Outage ID to delete
* @param $id outage Outage ID to delete
* @throws InvalidArgumentException If ID is not valid.
*/
public function delete($id) {
global $DB;