changing the testUserHasRight
This commit is contained in:
parent
0af9fe275d
commit
e07a94a051
@ -263,39 +263,38 @@ class UserTest extends PHPUnit\Framework\TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* testUserHasRight
|
* testUserHasRight
|
||||||
*
|
* @param User $localobject User
|
||||||
* @return void
|
* @return User $localobject User
|
||||||
|
* @depends testUserOther
|
||||||
*/
|
*/
|
||||||
// public function testUserHasRight()
|
public function testUserHasRight($localobject)
|
||||||
// {
|
{
|
||||||
// global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
// $conf=$this->savconf;
|
$conf=$this->savconf;
|
||||||
// $user=$this->savuser;
|
$user=$this->savuser;
|
||||||
// $langs=$this->savlangs;
|
$langs=$this->savlangs;
|
||||||
// $db=$this->savdb;
|
$db=$this->savdb;
|
||||||
// /*$result=$localobject->setstatus(0);
|
/*$result=$localobject->setstatus(0);
|
||||||
// print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||||
// $this->assertLessThan($result, 0);
|
$this->assertLessThan($result, 0);
|
||||||
// */
|
*/
|
||||||
|
|
||||||
// print __METHOD__." id=". $user->id ."\n";
|
print __METHOD__." id=". $localobject->id ."\n";
|
||||||
// //$this->assertNotEquals($user->date_creation, '');
|
//$this->assertNotEquals($user->date_creation, '');
|
||||||
// $user->addrights(0, 'supplier_proposal');
|
$user->addrights(0, 'supplier_proposal');
|
||||||
|
$this->assertEquals($localobject->hasRight('member', ''), 0);
|
||||||
|
$this->assertEquals($localobject->hasRight('member', 'member'), 0);$this->assertEquals($localobject->hasRight('product', 'member', 'read'), 0);
|
||||||
|
$this->assertEquals($localobject->hasRight('member', 'member'), 0);$this->assertEquals($localobject->hasRight('produit', 'member', 'read'), 0);
|
||||||
|
|
||||||
// $this->assertEquals($user->hasRight('member', ''), 0);
|
return $localobject;
|
||||||
// $this->assertEquals($user->hasRight('member', 'member'), 0);$this->assertEquals($user->hasRight('product', 'member', 'read'), 0);
|
}
|
||||||
// $this->assertEquals($user->hasRight('member', 'member'), 0);$this->assertEquals($user->hasRight('produit', 'member', 'read'), 0);
|
|
||||||
// $user->clearrights();
|
|
||||||
// //print __METHOD__. $user->hasRight('module', 'level11');
|
|
||||||
// return $user;
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testUserSetPassword
|
* testUserSetPassword
|
||||||
*
|
*
|
||||||
* @param User $localobject User
|
* @param User $localobject User
|
||||||
* @return void
|
* @return void
|
||||||
* @depends testUserOther
|
* @depends testUserHasRight
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
public function testUserSetPassword($localobject)
|
public function testUserSetPassword($localobject)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user