mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
37 lines
861 B
PHP
37 lines
861 B
PHP
<?php
|
|
/**
|
|
* Orange Management
|
|
*
|
|
* PHP Version 7.1
|
|
*
|
|
* @package TBD
|
|
* @copyright Dennis Eichhorn
|
|
* @license OMS License 1.0
|
|
* @version 1.0.0
|
|
* @link http://website.orange-management.de
|
|
*/
|
|
|
|
namespace phpOMS\tests\DataStorage\Database\Connection;
|
|
|
|
use phpOMS\DataStorage\Database\Connection\ConnectionFactory;
|
|
use phpOMS\DataStorage\Database\Connection\MysqlConnection;
|
|
|
|
class ConnectionFactoryTest extends \PHPUnit\Framework\TestCase
|
|
{
|
|
public function testCreate()
|
|
{
|
|
self::assertInstanceOf(
|
|
MysqlConnection::class,
|
|
ConnectionFactory::create($GLOBALS['CONFIG']['db']['core']['masters']['admin'])
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @expectedException \InvalidArgumentException
|
|
*/
|
|
public function testInvalidDatabaseType()
|
|
{
|
|
ConnectionFactory::create(['db' => 'invalid']);
|
|
}
|
|
}
|