Remove all the trailing spaces

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3076 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2016-09-23 14:46:24 +00:00
parent af404818e5
commit 59e38dff4e
9 changed files with 46 additions and 47 deletions

View File

@@ -9,7 +9,7 @@ class test_authhtpasswd extends PHPUnit_Framework_TestCase
public function test_clean ()
{
@unlink ("/tmp/htpasswd.file");
file_put_contents ("/tmp/htpasswd.file",
file_put_contents ("/tmp/htpasswd.file",
'toto@toto.com:$2y$05$dO7qyX4simzg3pMgWyqHgeAjFauXEyUdPdyrwDMVNj4fTuE24TGuq'
."\n".
'titi@titi.com:$2y$05$dO7qyX4simzg3pMgWyqHgeAjFauXEyUdPdyrwDMVNj4fTuE24TGuq'
@@ -29,7 +29,7 @@ class test_authhtpasswd extends PHPUnit_Framework_TestCase
{
$authhtpasswd = new authhtpasswd ();
$authhtpasswd->htpasswdFile = "/tmp/htpasswd.file";
$res = $authhtpasswd->authentication ("toto@toto.com", "toto123");
$res = $authhtpasswd->authentication ("toto@toto.com", "toto123");
$this->assertSame ($res, true);
}
@@ -38,7 +38,7 @@ class test_authhtpasswd extends PHPUnit_Framework_TestCase
$authhtpasswd = new authhtpasswd ();
$authhtpasswd->htpasswdFile = "/tmp/htpasswd.file";
$this->setExpectedException ("Exception");
$res = $authhtpasswd->authentication ("UNKNOWN@toto.com", "toto123");
$res = $authhtpasswd->authentication ("UNKNOWN@toto.com", "toto123");
}
public function test_authentication3 ()
@@ -46,14 +46,14 @@ class test_authhtpasswd extends PHPUnit_Framework_TestCase
$authhtpasswd = new authhtpasswd ();
$authhtpasswd->htpasswdFile = "/tmp/htpasswd.file";
$this->setExpectedException ("Exception");
$res = $authhtpasswd->authentication ("toto@toto.com", "BAD PASSWD");
$res = $authhtpasswd->authentication ("toto@toto.com", "BAD PASSWD");
}
public function test_authentication4 ()
{
$authhtpasswd = new authhtpasswd ();
$authhtpasswd->htpasswdFile = "/tmp/htpasswd.file";
$res = $authhtpasswd->authentication ("titi@titi.com", "toto123");
$res = $authhtpasswd->authentication ("titi@titi.com", "toto123");
$this->assertSame ($res, true);
}
}

View File

@@ -39,7 +39,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
public function test_createTables2 ()
{
$authz = new authzgroups ();
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$this->dbconfig["password"],
$this->dbconfig["driver_options"]);
$res = $authz->createTables ();
@@ -52,7 +52,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
public function test_objectCreate1 ()
{
$authz = new authzgroups ();
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$this->dbconfig["password"],
$this->dbconfig["driver_options"]);
$res = $authz->objectAdd ("MODULE", "/object");
@@ -62,7 +62,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
public function test_objectUpdate1 ()
{
$authz = new authzgroups ();
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$this->dbconfig["password"],
$this->dbconfig["driver_options"]);
$res = $authz->objectUpdate ("MODULE", "/object", "/object2");
@@ -72,7 +72,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
public function test_objectDelete1 ()
{
$authz = new authzgroups ();
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$this->dbconfig["password"],
$this->dbconfig["driver_options"]);
// The object was renamed and is not available
@@ -86,7 +86,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
public function test_groupCreate1 ()
{
$authz = new authzgroups ();
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$this->dbconfig["password"],
$this->dbconfig["driver_options"]);
$res = $authz->groupAdd ("MODULE", "group");
@@ -96,7 +96,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
public function test_groupUpdate1 ()
{
$authz = new authzgroups ();
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$this->dbconfig["password"],
$this->dbconfig["driver_options"]);
$res = $authz->groupUpdate ("MODULE", "group", "group2");
@@ -106,7 +106,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
public function test_groupDelete1 ()
{
$authz = new authzgroups ();
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$this->dbconfig["password"],
$this->dbconfig["driver_options"]);
// The group doesn't exists
@@ -120,7 +120,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
public function test_groupmemberCreate1 ()
{
$authz = new authzgroups ();
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$this->dbconfig["password"],
$this->dbconfig["driver_options"]);
// The group doesn't exists
@@ -131,7 +131,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
public function test_groupmemberCreate2 ()
{
$authz = new authzgroups ();
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$this->dbconfig["password"],
$this->dbconfig["driver_options"]);
$res = $authz->groupmemberAdd ("MODULE", "group2", "userKnown");
@@ -141,7 +141,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
public function test_groupmemberDelete1 ()
{
$authz = new authzgroups ();
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$this->dbconfig["password"],
$this->dbconfig["driver_options"]);
// The group doesn't exists
@@ -158,7 +158,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
// The group doesn't exists
$this->setExpectedException ("Exception");
$res = $authz->groupmemberReadGroup ("MODULE", "group");
}
}
public function test_groupmemberReadGroup2 ()
{
@@ -168,7 +168,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
$this->dbconfig["driver_options"]);
$res = $authz->groupmemberReadGroup ("MODULE", "group2");
$this->assertSame (array (array ("user"=>"userKnown")), $res);
}
}
public function test_groupmemberReadUser1 ()
{
@@ -178,7 +178,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
$this->dbconfig["driver_options"]);
$res = $authz->groupmemberReadUser ("MODULE", "userKnown");
$this->assertSame (array (1=>"group2"), $res);
}
}
////////////////
// RIGHTS //
@@ -186,7 +186,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
public function test_rightCreate1 ()
{
$authz = new authzgroups ();
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$this->dbconfig["password"],
$this->dbconfig["driver_options"]);
$res = $authz->rightAdd ("MODULE", "group2","/object2", "RW");
@@ -196,7 +196,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
public function test_rightUpdate1 ()
{
$authz = new authzgroups ();
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$this->dbconfig["password"],
$this->dbconfig["driver_options"]);
$res = $authz->rightUpdate ("MODULE", "group2", "/object2", "RO");
@@ -206,7 +206,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
public function test_rightDelete1 ()
{
$authz = new authzgroups ();
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$this->dbconfig["password"],
$this->dbconfig["driver_options"]);
// The object doesn't exists
@@ -221,7 +221,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
public function test_deleteGroupmember2 ()
{
$authz = new authzgroups ();
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$this->dbconfig["password"],
$this->dbconfig["driver_options"]);
$res = $authz->groupmemberDel ("MODULE", "group2","userKnown");
@@ -231,7 +231,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
public function test_deleteObject2 ()
{
$authz = new authzgroups ();
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$this->dbconfig["password"],
$this->dbconfig["driver_options"]);
$res = $authz->objectDel ("MODULE", "/object2");
@@ -241,7 +241,7 @@ class test_authzgroups extends PHPUnit_Framework_TestCase
public function test_deleteGroup2 ()
{
$authz = new authzgroups ();
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$authz->connect ($this->dbconfig["dsn"], $this->dbconfig["username"],
$this->dbconfig["password"],
$this->dbconfig["driver_options"]);
$res = $authz->groupDel ("MODULE", "group2");

View File

@@ -32,7 +32,7 @@ class test_dbjson extends PHPUnit_Framework_TestCase
$res = $dbjson->insertMany ("collection",
array ("key1"=>"val1", "key2"=>"val2"));
}
public function test_insertMany2 ()
{
// Document #2 and #3
@@ -42,7 +42,7 @@ class test_dbjson extends PHPUnit_Framework_TestCase
array ("key1"=>"val3", "key2"=>"val4")));
$this->assertSame ($res, 2);
}
public function test_filter1 ()
{
// Return all the keys (filter = array ())
@@ -118,7 +118,7 @@ class test_dbjson extends PHPUnit_Framework_TestCase
}
public function test_find3 ()
{
// Exception : fields not an array
// Exception : fields not an array
$this->setExpectedException ("Exception");
$dbjson = new dbjson ("dbjson://".dbfile);
$res = $dbjson->find ("collection", array ("key1"=>array ("val3", "<="),
@@ -234,7 +234,7 @@ class test_dbjson extends PHPUnit_Framework_TestCase
unset ($res[2]["_id"]);
$this->assertSame ($res, array ());
}
public function test_find11 ()
{
$dbjson = new dbjson ("dbjson://".dbfile);
@@ -262,7 +262,7 @@ class test_dbjson extends PHPUnit_Framework_TestCase
public function test_update1 ()
{
$dbjson = new dbjson ("dbjson://".dbfile);
$res = $dbjson->update ("collection", array (), array ("key2"=>"val6",
$res = $dbjson->update ("collection", array (), array ("key2"=>"val6",
"key5"=>"val5"));
$this->assertSame ($res, 1);
}
@@ -299,7 +299,7 @@ class test_dbjson extends PHPUnit_Framework_TestCase
public function test_update2 ()
{
$dbjson = new dbjson ("dbjson://".dbfile);
$res = $dbjson->update ("collection", array (), array ("key2"=>"val7",
$res = $dbjson->update ("collection", array (), array ("key2"=>"val7",
"key5"=>"val8"));
$this->assertSame ($res, 2);
}
@@ -321,7 +321,7 @@ class test_dbjson extends PHPUnit_Framework_TestCase
{
$dbjson = new dbjson ("dbjson://".dbfile);
$res = $dbjson->update ("collection", array (),
array ("key2"=>"val9",
array ("key2"=>"val9",
"key5"=>"val7",
"_unset"=>array ("key2")));
$this->assertSame ($res, 2);

View File

@@ -45,7 +45,7 @@ class test_dblayer_{ENGINE} extends PHPUnit_Framework_TestCase
$table)
{
$db->table = $table;
try
try
{
$res = $db->dropTable();
}
@@ -270,7 +270,7 @@ class test_dblayer_{ENGINE} extends PHPUnit_Framework_TestCase
// SQLite start at 1, MySQL start at 0...
$this->assertLessThanOrEqual ($res, 2);
}
// Test the unique feature
public function test_insert3 ()
{

View File

@@ -88,7 +88,7 @@ class test_dblayerauthzgroups_sqlite extends PHPUnit_Framework_TestCase
->uniqueSet (array ("id", array ("zo ne", "vie wname")))
->authzgroupsSet ($a)
->moduleSet ("modTest")
->userSet ("user")
->userSet ("user")
->createGroupSet ("group")
->pathSet ("/article/base/poub");
$res = $n->insert (array ("zo ne"=>"zone1",
@@ -130,7 +130,7 @@ class test_dblayerauthzgroups_sqlite extends PHPUnit_Framework_TestCase
->uniqueSet (array ("id", array ("zo ne", "vie wname")))
->authzgroupsSet ($a)
->moduleSet ("modTest")
->userSet ("user")
->userSet ("user")
->createGroupSet ("group")
->pathSet ("/article/base/poub");
$n->insert (array ("zo ne"=>"zone2", "opendate"=>"2015-05-04 00:11:22"));
@@ -165,7 +165,7 @@ class test_dblayerauthzgroups_sqlite extends PHPUnit_Framework_TestCase
->uniqueSet (array ("id", array ("zo ne", "vie wname")))
->authzgroupsSet ($a)
->moduleSet ("modTest")
->userSet ("user")
->userSet ("user")
->createGroupSet ("group")
->pathSet ("/article/base/poub");
$res = count ($n->read ());
@@ -209,7 +209,7 @@ class test_dblayerauthzgroups_sqlite extends PHPUnit_Framework_TestCase
->uniqueSet (array ("id", array ("zo ne", "vie wname")))
->authzgroupsSet ($a)
->moduleSet ("modTest")
->userSet ("user")
->userSet ("user")
->createGroupSet ("group")
->pathSet ("/article/base/poub");
$res = count ($n->read ());
@@ -240,7 +240,7 @@ class test_dblayerauthzgroups_sqlite extends PHPUnit_Framework_TestCase
->uniqueSet (array ("id", array ("zo ne", "vie wname")))
->authzgroupsSet ($a)
->moduleSet ("modTest")
->userSet ("user")
->userSet ("user")
->createGroupSet ("group")
->pathSet ("/article/base/poub");
$this->setExpectedException ("Exception");
@@ -282,7 +282,7 @@ class test_dblayerauthzgroups_sqlite extends PHPUnit_Framework_TestCase
->uniqueSet (array ("id", array ("zo ne", "vie wname")))
->authzgroupsSet ($a)
->moduleSet ("modTest")
->userSet ("user")
->userSet ("user")
->createGroupSet ("group")
->pathSet ("/article/base/poub");
$this->setExpectedException ("Exception");
@@ -312,7 +312,7 @@ class test_dblayerauthzgroups_sqlite extends PHPUnit_Framework_TestCase
->uniqueSet (array ("id", array ("zo ne", "vie wname")))
->authzgroupsSet ($a)
->moduleSet ("modTest")
->userSet ("user")
->userSet ("user")
->createGroupSet ("group")
->pathSet ("/article/base/poub");
$this->setExpectedException ("Exception");
@@ -354,7 +354,7 @@ class test_dblayerauthzgroups_sqlite extends PHPUnit_Framework_TestCase
->uniqueSet (array ("id", array ("zo ne", "vie wname")))
->authzgroupsSet ($a)
->moduleSet ("modTest")
->userSet ("user")
->userSet ("user")
->createGroupSet ("group")
->pathSet ("/article/base/poub");
$res = $n->update (1, array ("zo ne"=>"ALLOWED"));
@@ -384,7 +384,7 @@ class test_dblayerauthzgroups_sqlite extends PHPUnit_Framework_TestCase
->uniqueSet (array ("id", array ("zo ne", "vie wname")))
->authzgroupsSet ($a)
->moduleSet ("modTest")
->userSet ("user")
->userSet ("user")
->createGroupSet ("group")
->pathSet ("/article/base/poub");
$res = $n->delete (1);
@@ -426,7 +426,7 @@ class test_dblayerauthzgroups_sqlite extends PHPUnit_Framework_TestCase
->uniqueSet (array ("id", array ("zo ne", "vie wname")))
->authzgroupsSet ($a)
->moduleSet ("modTest")
->userSet ("user")
->userSet ("user")
->createGroupSet ("group")
->pathSet ("/article/base/poub");
$res = $n->read (null, array ("zo ne", "vie wname"));

View File

@@ -33,7 +33,7 @@ class test_outputhtml extends PHPUnit_Framework_TestCase
$this->expectOutputString("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">
<html><body>
Text
"." "."
</body></html>\n");
$output = new outputhtml ();
$output->out ("data", "title", FALSE, FALSE, "Tests/layout.html" );

View File

@@ -90,7 +90,7 @@ class test_userssql extends PHPUnit_Framework_TestCase
"titi2");
$this->assertSame ($res, 1);
}
public function test_listusers3 ()
{
$userssql = new userssql ("sqlite:///tmp/database.db");