2015-09-06 13:42:57 +00:00
|
|
|
<?php
|
2015-10-11 18:14:49 +00:00
|
|
|
/**
|
2016-05-07 17:22:09 +00:00
|
|
|
* FuzeWorks.
|
2015-10-11 18:14:49 +00:00
|
|
|
*
|
|
|
|
* The FuzeWorks MVC PHP FrameWork
|
|
|
|
*
|
2017-07-14 14:14:47 +00:00
|
|
|
* Copyright (C) 2017 TechFuze
|
2015-10-11 18:14:49 +00:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* @author TechFuze
|
2017-07-14 14:14:47 +00:00
|
|
|
* @copyright Copyright (c) 2013 - 2017, Techfuze. (http://techfuze.net)
|
2015-10-11 18:14:49 +00:00
|
|
|
* @copyright Copyright (c) 1996 - 2015, Free Software Foundation, Inc. (http://www.fsf.org/)
|
|
|
|
* @license http://opensource.org/licenses/GPL-3.0 GPLv3 License
|
2016-05-07 17:22:09 +00:00
|
|
|
*
|
2016-07-23 15:06:19 +00:00
|
|
|
* @link http://techfuze.net/fuzeworks
|
2017-07-14 14:14:47 +00:00
|
|
|
* @since Version 1.0.4
|
2016-05-07 17:22:09 +00:00
|
|
|
*
|
2017-07-14 14:14:47 +00:00
|
|
|
* @version Version 1.0.4
|
2015-10-11 18:14:49 +00:00
|
|
|
*/
|
2017-07-14 14:14:47 +00:00
|
|
|
|
2016-06-07 13:09:41 +00:00
|
|
|
use FuzeWorks\Factory;
|
2017-07-14 14:14:47 +00:00
|
|
|
use FuzeWorks\Exception\DatabaseException;
|
2015-09-06 13:42:57 +00:00
|
|
|
|
|
|
|
/**
|
2017-07-14 14:14:47 +00:00
|
|
|
* Class databaseTest.
|
2015-09-06 13:42:57 +00:00
|
|
|
*
|
2017-07-14 14:14:47 +00:00
|
|
|
* Core testing suite. Will test databases, querybuilders and frequently used drivers.
|
2015-09-06 13:42:57 +00:00
|
|
|
*/
|
2017-07-14 14:14:47 +00:00
|
|
|
class databaseTest extends CoreTestAbstract
|
2015-09-06 13:42:57 +00:00
|
|
|
{
|
2016-08-07 11:21:37 +00:00
|
|
|
|
2017-07-14 14:14:47 +00:00
|
|
|
protected $factory;
|
2016-08-07 11:21:37 +00:00
|
|
|
|
2017-07-14 14:14:47 +00:00
|
|
|
public function setUp()
|
|
|
|
{
|
|
|
|
$this->factory = Factory::getInstance();
|
|
|
|
}
|
2016-08-07 11:21:37 +00:00
|
|
|
|
2017-07-14 14:14:47 +00:00
|
|
|
/**
|
|
|
|
* @expectedException FuzeWorks\Exception\DatabaseException
|
|
|
|
*/
|
|
|
|
public function testInvalidDb()
|
|
|
|
{
|
|
|
|
$this->factory->database->get('unknown://unknown:password@unknown/database');
|
2015-09-06 13:42:57 +00:00
|
|
|
}
|
2017-07-14 14:14:47 +00:00
|
|
|
|
2016-05-07 17:22:09 +00:00
|
|
|
}
|