Passage en Namespace et tous les tests fonctionnels OK
This commit is contained in:
@@ -7,7 +7,10 @@
|
||||
|
||||
namespace Domframework\Tests;
|
||||
|
||||
class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
use Domframework\Dblayerauthzgroups;
|
||||
use Domframework\Authzgroups;
|
||||
|
||||
class DblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public $confs = array (
|
||||
"sqlite" => array (
|
||||
@@ -27,7 +30,7 @@ class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_createTablesAuthzgroups ()
|
||||
{
|
||||
$dbconfig = $this->confs["sqlite"];
|
||||
$a = new authzgroups ();
|
||||
$a = new Authzgroups ();
|
||||
$a->connect ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$a->createTables ();
|
||||
@@ -48,11 +51,11 @@ class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_createTable ()
|
||||
{
|
||||
$dbconfig = $this->confs["sqlite"];
|
||||
$n = new dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$n = new Dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"],
|
||||
$dbconfig["driver_options"]);
|
||||
$n->disconnect ();
|
||||
$n = new dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$n = new Dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"],
|
||||
$dbconfig["driver_options"]);
|
||||
$n->tableSet ("dns zones")
|
||||
@@ -73,10 +76,10 @@ class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_insert1 ()
|
||||
{
|
||||
$dbconfig = $this->confs["sqlite"];
|
||||
$a = new authzgroups ();
|
||||
$a = new Authzgroups ();
|
||||
$a->connect ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$n = new dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$n = new Dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"],
|
||||
$dbconfig["driver_options"]);
|
||||
$n->tableSet ("dns zones")
|
||||
@@ -105,7 +108,7 @@ class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_addAuthzgroups ()
|
||||
{
|
||||
$dbconfig = $this->confs["sqlite"];
|
||||
$a = new authzgroups ();
|
||||
$a = new Authzgroups ();
|
||||
$a->connect ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$res = $a->allow ("modTest", "user", "/article/base/poub/1");
|
||||
@@ -115,10 +118,10 @@ class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_insert2 ()
|
||||
{
|
||||
$dbconfig = $this->confs["sqlite"];
|
||||
$a = new authzgroups ();
|
||||
$a = new Authzgroups ();
|
||||
$a->connect ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$n = new dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$n = new Dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"],
|
||||
$dbconfig["driver_options"]);
|
||||
$n->tableSet ("dns zones")
|
||||
@@ -150,10 +153,10 @@ class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_read1 ()
|
||||
{
|
||||
$dbconfig = $this->confs["sqlite"];
|
||||
$a = new authzgroups ();
|
||||
$a = new Authzgroups ();
|
||||
$a->connect ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$n = new dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$n = new Dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"],
|
||||
$dbconfig["driver_options"]);
|
||||
$n->tableSet ("dns zones")
|
||||
@@ -181,7 +184,7 @@ class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_rightDel ()
|
||||
{
|
||||
$dbconfig = $this->confs["sqlite"];
|
||||
$a = new authzgroups ();
|
||||
$a = new Authzgroups ();
|
||||
$a->connect ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$a->rightDel ("modTest", "group", "/article/base/poub/2");
|
||||
@@ -194,10 +197,10 @@ class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_read2 ()
|
||||
{
|
||||
$dbconfig = $this->confs["sqlite"];
|
||||
$a = new authzgroups ();
|
||||
$a = new Authzgroups ();
|
||||
$a->connect ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$n = new dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$n = new Dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"],
|
||||
$dbconfig["driver_options"]);
|
||||
$n->tableSet ("dns zones")
|
||||
@@ -225,10 +228,10 @@ class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_delEntry1 ()
|
||||
{
|
||||
$dbconfig = $this->confs["sqlite"];
|
||||
$a = new authzgroups ();
|
||||
$a = new Authzgroups ();
|
||||
$a->connect ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$n = new dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$n = new Dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"],
|
||||
$dbconfig["driver_options"]);
|
||||
$n->tableSet ("dns zones")
|
||||
@@ -255,7 +258,7 @@ class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_rightRO ()
|
||||
{
|
||||
$dbconfig = $this->confs["sqlite"];
|
||||
$a = new authzgroups ();
|
||||
$a = new Authzgroups ();
|
||||
$a->connect ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$res = $a->rightUpdate ("modTest", "group", "/article/base/poub/1", "RO");
|
||||
@@ -267,10 +270,10 @@ class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_updateEntry2 ()
|
||||
{
|
||||
$dbconfig = $this->confs["sqlite"];
|
||||
$a = new authzgroups ();
|
||||
$a = new Authzgroups ();
|
||||
$a->connect ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$n = new dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$n = new Dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"],
|
||||
$dbconfig["driver_options"]);
|
||||
$n->tableSet ("dns zones")
|
||||
@@ -297,10 +300,10 @@ class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_delEntry2 ()
|
||||
{
|
||||
$dbconfig = $this->confs["sqlite"];
|
||||
$a = new authzgroups ();
|
||||
$a = new Authzgroups ();
|
||||
$a->connect ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$n = new dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$n = new Dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"],
|
||||
$dbconfig["driver_options"]);
|
||||
$n->tableSet ("dns zones")
|
||||
@@ -327,7 +330,7 @@ class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_rightRW ()
|
||||
{
|
||||
$dbconfig = $this->confs["sqlite"];
|
||||
$a = new authzgroups ();
|
||||
$a = new Authzgroups ();
|
||||
$a->connect ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$res = $a->rightUpdate ("modTest", "group", "/article/base/poub/1", "RW");
|
||||
@@ -339,10 +342,10 @@ class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_updateEntry3 ()
|
||||
{
|
||||
$dbconfig = $this->confs["sqlite"];
|
||||
$a = new authzgroups ();
|
||||
$a = new Authzgroups ();
|
||||
$a->connect ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$n = new dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$n = new Dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"],
|
||||
$dbconfig["driver_options"]);
|
||||
$n->tableSet ("dns zones")
|
||||
@@ -369,10 +372,10 @@ class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_delEntry3 ()
|
||||
{
|
||||
$dbconfig = $this->confs["sqlite"];
|
||||
$a = new authzgroups ();
|
||||
$a = new Authzgroups ();
|
||||
$a->connect ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$n = new dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$n = new Dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"],
|
||||
$dbconfig["driver_options"]);
|
||||
$n->tableSet ("dns zones")
|
||||
@@ -399,7 +402,7 @@ class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_delAuthzgroups ()
|
||||
{
|
||||
$dbconfig = $this->confs["sqlite"];
|
||||
$a = new authzgroups ();
|
||||
$a = new Authzgroups ();
|
||||
$a->connect ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$res = $a->objectRead ("modTest", "/article/base/poub/1");
|
||||
@@ -411,10 +414,10 @@ class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_read3 ()
|
||||
{
|
||||
$dbconfig = $this->confs["sqlite"];
|
||||
$a = new authzgroups ();
|
||||
$a = new Authzgroups ();
|
||||
$a->connect ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$n = new dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$n = new Dblayerauthzgroups ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"],
|
||||
$dbconfig["driver_options"]);
|
||||
$n->tableSet ("dns zones")
|
||||
|
||||
Reference in New Issue
Block a user