2013-08-23 15:55:00 +02:00
|
|
|
<?php
|
2016-02-08 15:41:00 +01:00
|
|
|
/* Icinga Web 2 | (c) 2013 Icinga Development Team | GPLv2+ */
|
2013-08-23 15:55:00 +02:00
|
|
|
|
|
|
|
namespace Icinga\Test;
|
|
|
|
|
2014-06-06 08:43:13 +02:00
|
|
|
use Icinga\Data\Db\DbConnection;
|
2013-08-23 15:55:00 +02:00
|
|
|
|
|
|
|
interface DbTest
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* PHPUnit provider for mysql
|
|
|
|
*
|
2014-06-06 08:43:13 +02:00
|
|
|
* @return DbConnection
|
2013-08-23 15:55:00 +02:00
|
|
|
*/
|
|
|
|
public function mysqlDb();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* PHPUnit provider for pgsql
|
|
|
|
*
|
2014-06-06 08:43:13 +02:00
|
|
|
* @return DbConnection
|
2013-08-23 15:55:00 +02:00
|
|
|
*/
|
|
|
|
public function pgsqlDb();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* PHPUnit provider for oracle
|
|
|
|
*
|
2014-06-06 08:43:13 +02:00
|
|
|
* @return DbConnection
|
2013-08-23 15:55:00 +02:00
|
|
|
*/
|
|
|
|
public function oracleDb();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Executes sql file on PDO object
|
|
|
|
*
|
2014-06-06 08:43:13 +02:00
|
|
|
* @param DbConnection $resource
|
2014-04-10 11:33:24 +02:00
|
|
|
* @param string $filename
|
2013-08-23 15:55:00 +02:00
|
|
|
*
|
|
|
|
* @return boolean Operational success flag
|
|
|
|
*/
|
2014-06-06 08:43:13 +02:00
|
|
|
public function loadSql(DbConnection $resource, $filename);
|
2013-08-23 15:55:00 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Setup provider for testcase
|
|
|
|
*
|
2014-06-06 08:43:13 +02:00
|
|
|
* @param string|DbConnection|null $resource
|
2013-08-23 15:55:00 +02:00
|
|
|
*/
|
|
|
|
public function setupDbProvider($resource);
|
|
|
|
}
|