dblayeroo : Add normalize method by default
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4631 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -177,7 +177,8 @@ class test_dblayeroo_{ENGINE} extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
// Insert : first row inserted
|
||||
$tbl1 = $this->tbl1 ();
|
||||
$res = $tbl1->insert()->setValues(array ("group"=>"group1",
|
||||
// Normalize the value to be inserted too
|
||||
$res = $tbl1->insert()->setValues(array ("group"=>" group1 ",
|
||||
"where"=>"where",
|
||||
"object"=>"object"))->execute ();
|
||||
$tbl1->disconnect ();
|
||||
@@ -1295,35 +1296,35 @@ class test_dblayeroo_{ENGINE} extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
//// TEST REAL TYPES ////
|
||||
public function test_checkRealType_1 ()
|
||||
public function test_checkRealTypes_1 ()
|
||||
{
|
||||
$tbl1 = $this->tbl1 ();
|
||||
$res = $tbl1->checkRealType (array ("group" => "notempty"));
|
||||
$res = $tbl1->checkRealTypes (array ("group" => "notempty"));
|
||||
$this->assertSame (array (
|
||||
"object" => "The field can not be empty",
|
||||
"where" => "The field can not be empty",
|
||||
), $res);
|
||||
}
|
||||
public function test_checkRealType_2 ()
|
||||
public function test_checkRealTypes_2 ()
|
||||
{
|
||||
$tbl1 = $this->tbl1 ();
|
||||
$res = $tbl1->checkRealType (array ("group" => "not valid"));
|
||||
$res = $tbl1->checkRealTypes (array ("group" => "not valid"));
|
||||
$this->assertSame (array (
|
||||
"group" => "Invalid value provided : do not match the regex",
|
||||
"object" => "The field can not be empty",
|
||||
"where" => "The field can not be empty",
|
||||
), $res);
|
||||
}
|
||||
public function test_checkRealType_3 ()
|
||||
public function test_checkRealTypes_3 ()
|
||||
{
|
||||
$tbl1 = $this->tbl1 ();
|
||||
$res = $tbl1->checkRealType (array ("group" => "notempty"), true);
|
||||
$res = $tbl1->checkRealTypes (array ("group" => "notempty"), true);
|
||||
$this->assertSame (array (), $res);
|
||||
}
|
||||
public function test_checkRealType_4 ()
|
||||
public function test_checkRealTypes_4 ()
|
||||
{
|
||||
$tbl1 = $this->tbl1 ();
|
||||
$res = $tbl1->checkRealType (array ("group" => "not valid"), true);
|
||||
$res = $tbl1->checkRealTypes (array ("group" => "not valid"), true);
|
||||
$this->assertSame (array (
|
||||
"group" => "Invalid value provided : do not match the regex",
|
||||
), $res);
|
||||
|
||||
Reference in New Issue
Block a user