diff --git a/Tests/dblayerComplet.php b/Tests/dblayerComplet.php index 8a1436a..49e8801 100644 --- a/Tests/dblayerComplet.php +++ b/Tests/dblayerComplet.php @@ -186,4 +186,22 @@ class test_dblayer_{ENGINE} extends PHPUnit_Framework_TestCase "with space"=>"WITH SPACE")), $res); } + public function test_update3 () + { + $dbconfig = $this->confs["{ENGINE}"]; + $db = new dblayer ($dbconfig["dsn"], $dbconfig["username"], + $dbconfig["password"], $dbconfig["driver_options"]); + $db->table = "grouped"; + $db->fields = array ("group"=>array ("varchar", "255", "not null"), + "object"=>array ("varchar", "255", "not null"), + "where"=>array ("varchar", "255", "not null"), + "with space"=>array ("varchar", "255", "not null")); + $db->unique = array ("group"); + $db->primary = "group"; + // Update primary key with primary key in unique + $res = $db->update ("NEW GROUP", array ("group"=>"NEW GROUP", + "object"=>"%éàoppp", + "with space"=>"WITH SPACE")); + $this->assertSame (1, $res); + } }