Passage en Namespace et tous les tests fonctionnels OK
This commit is contained in:
@@ -7,7 +7,9 @@
|
||||
|
||||
namespace Domframework\Tests;
|
||||
|
||||
class dblayerooTest{ENGINE} extends PHPUnit_Framework_TestCase
|
||||
use Domframework\Dblayeroo;
|
||||
|
||||
class DblayerooTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
// Test with column name 'group', 'object', 'where', 'with space'
|
||||
// Test with table name 'group', 'object', 'where', 'with space'
|
||||
@@ -41,7 +43,7 @@ class dblayerooTest{ENGINE} extends PHPUnit_Framework_TestCase
|
||||
private function tbl1 ()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$tbl1 = new dblayeroo ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$tbl1 = new Dblayeroo ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$tbl1->table ("groupedoo");
|
||||
$tbl1->fields (array ("group"=>array ("varchar(255)", "not null"),
|
||||
@@ -57,7 +59,7 @@ class dblayerooTest{ENGINE} extends PHPUnit_Framework_TestCase
|
||||
private function tbl2 ()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$tbl2 = new dblayeroo ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$tbl2 = new Dblayeroo ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$tbl2->table ("usersoo");
|
||||
$tbl2->fields (array ("uid"=>array ("integer", "not null", "autoincrement"),
|
||||
@@ -75,7 +77,7 @@ class dblayerooTest{ENGINE} extends PHPUnit_Framework_TestCase
|
||||
private function tbl3 ()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$tbl3 = new dblayeroo ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$tbl3 = new Dblayeroo ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
return $tbl3;
|
||||
}
|
||||
@@ -83,7 +85,7 @@ class dblayerooTest{ENGINE} extends PHPUnit_Framework_TestCase
|
||||
private function tbl4 ()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$tbl4 = new dblayeroo ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$tbl4 = new Dblayeroo ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$tbl4->table ("rightsoo");
|
||||
$tbl4->fields (array ("id"=>array ("integer", "not null", "autoincrement"),
|
||||
@@ -100,7 +102,7 @@ class dblayerooTest{ENGINE} extends PHPUnit_Framework_TestCase
|
||||
public function test_dropTable ()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$db = new dblayeroo ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$db = new Dblayeroo ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
foreach (array ("rightsoo", "usersoo", "groupedoo",
|
||||
"multipleoo", "multiple2oo", "users3oo",
|
||||
@@ -112,7 +114,7 @@ class dblayerooTest{ENGINE} extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$res = $db->dropTable();
|
||||
}
|
||||
catch (Exception $e)
|
||||
catch (\Exception $e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user