Passage en Namespace et tous les tests fonctionnels OK
This commit is contained in:
@@ -7,8 +7,10 @@
|
||||
|
||||
namespace Domframework\Tests;
|
||||
|
||||
/** Test the authzgroupsoo.php file */
|
||||
class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
use Domframework\Authzgroupsoo;
|
||||
|
||||
/** Test the Authzgroupsoo.php file */
|
||||
class AuthzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
private $dbconfig = array (
|
||||
"dsn" => "sqlite:/tmp/databaseAuthzGroupsoo.db",
|
||||
@@ -19,12 +21,13 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
);
|
||||
public function test_Initialization ()
|
||||
{
|
||||
@unlink ("/tmp/databaseAuthzGroupsoo.db");
|
||||
if (file_exists ("/tmp/databaseAuthzGroupsoo.db"))
|
||||
unlink ("/tmp/databaseAuthzGroupsoo.db");
|
||||
}
|
||||
|
||||
public function test_createTables1 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$this->setExpectedException ("Exception");
|
||||
$authz->createTables ();
|
||||
}
|
||||
@@ -33,7 +36,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
// Must use the model to create the database structure as there is no
|
||||
// creation of tables in controller
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$res = $authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -42,7 +45,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_createTables2 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -55,7 +58,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
////////////////
|
||||
public function test_objectCreate1 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -65,7 +68,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_objectUpdate1 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -75,7 +78,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_objectDelete1 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -89,7 +92,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
////////////////
|
||||
public function test_groupCreate1 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -99,7 +102,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_groupUpdate1 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -109,7 +112,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_groupDelete1 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -123,7 +126,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
/////////////////////
|
||||
public function test_groupmemberCreate1 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -134,7 +137,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_groupmemberCreate2 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -144,7 +147,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_groupmemberDelete1 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -155,7 +158,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_groupmemberReadGroup1 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -166,7 +169,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_groupmemberReadGroup2 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -176,7 +179,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_groupmemberReadUser1 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -189,7 +192,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
////////////////
|
||||
public function test_rightCreate1 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -199,7 +202,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_rightUpdate1 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -209,7 +212,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_rightDelete1 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -224,7 +227,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
//////////////////////////////////////////////
|
||||
public function test_deleteGroupmember2 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -234,7 +237,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_deleteObject2 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -244,7 +247,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_deleteGroup2 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -257,7 +260,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
/////////////////////
|
||||
public function test_userrightsget1 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -286,7 +289,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_allow1 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -296,7 +299,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_allow2 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -307,7 +310,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_allow3 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
@@ -318,7 +321,7 @@ class authzgroupsooTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_allow4 ()
|
||||
{
|
||||
$authz = new authzgroupsoo ();
|
||||
$authz = new Authzgroupsoo ();
|
||||
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
|
||||
$this->dbconfig["password"],
|
||||
$this->dbconfig["driver_options"]);
|
||||
|
||||
Reference in New Issue
Block a user