diff --git a/Tests/dblayerauthzgroupsTest.php b/Tests/dblayerauthzgroupsTest.php index 02b12af..5bc7193 100644 --- a/Tests/dblayerauthzgroupsTest.php +++ b/Tests/dblayerauthzgroupsTest.php @@ -97,6 +97,17 @@ class test_dblayerauthzgroups_sqlite extends PHPUnit_Framework_TestCase $this->assertSame ("1", $res); } + // Check if the update of the authzgroups database is OK + public function test_addAuthzgroups () + { + $dbconfig = $this->confs["sqlite"]; + $a = new authzgroups (); + $a->connect ($dbconfig["dsn"], $dbconfig["username"], + $dbconfig["password"], $dbconfig["driver_options"]); + $res = $a->allow ("modTest", "user", "/article/base/poub/1"); + $this->assertSame ("RW", $res); + } + public function test_insert2 () { $dbconfig = $this->confs["sqlite"]; @@ -380,6 +391,18 @@ class test_dblayerauthzgroups_sqlite extends PHPUnit_Framework_TestCase $this->assertSame (1, $res); } + // Check if the update of the authzgroups database is OK after deletion + public function test_delAuthzgroups () + { + $dbconfig = $this->confs["sqlite"]; + $a = new authzgroups (); + $a->connect ($dbconfig["dsn"], $dbconfig["username"], + $dbconfig["password"], $dbconfig["driver_options"]); + $res = $a->objectRead ("modTest", "/article/base/poub/1"); + $this->assertSame (array (), $res); + } + + // Read the zone without id public function test_read3 () {