2
0
forked from Wavyzz/dolibarr

Fix phpunit

This commit is contained in:
Laurent Destailleur
2017-05-21 20:46:11 +02:00
parent 6e31de731b
commit ff35229be5

View File

@@ -75,6 +75,9 @@ class UserTest extends PHPUnit_Framework_TestCase
public static function setUpBeforeClass()
{
global $conf,$user,$langs,$db;
if (! empty($conf->global->MAIN_LDAP_ENABLED)) { print "\n".__METHOD__." module LDAP must be disabled.\n"; die(); }
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
print __METHOD__."\n";
@@ -187,7 +190,7 @@ class UserTest extends PHPUnit_Framework_TestCase
$newlocalobject=new User($this->savdb);
$newlocalobject->initAsSpecimen();
$this->changeProperties($newlocalobject);
$this->assertEquals($this->objCompare($localobject,$newlocalobject,true,array('id','socid','societe_id','ref','pass_indatabase','pass_indatabase_crypted','datec','datem','datelastlogin','datepreviouslogin')), array()); // Actual, Expected
$this->assertEquals($this->objCompare($localobject,$newlocalobject,true,array('id','socid','societe_id','ref','pass','pass_indatabase','pass_indatabase_crypted','datec','datem','datelastlogin','datepreviouslogin')), array()); // Actual, Expected
return $localobject;
}