Fix phpunit

This commit is contained in:
Laurent Destailleur 2017-09-24 21:12:50 +02:00
parent 2e511badf9
commit 7a6180858e

View File

@ -196,7 +196,6 @@ class AdherentTest extends PHPUnit_Framework_TestCase
$result=$localobject->fetch($id);
print __METHOD__." id=".$id." result=".$result."\n";
$this->assertLessThan($result, 0);
return $localobject;
}
@ -318,14 +317,13 @@ class AdherentTest extends PHPUnit_Framework_TestCase
$langs=$this->savlangs;
$db=$this->savdb;
$template = '%DOL_MAIN_URL_ROOT%,%ID%,%CIVILITY%,%FIRSTNAME%,%LASTNAME%,%FULLNAME%,%COMPANY%,'.
'%ADDRESS%,%ZIP%,%TOWN%,%COUNTRY%,%EMAIL%,%BIRTH%,%PHOTO%,%LOGIN%,%PASSWORD%,%PRENOM%,'.
'%NOM%,%SOCIETE%,%ADDRESS%,%ZIP%,%TOWN%,%COUNTRY%';
$template = '__CIVILITY__,__FIRSTNAME__,__LASTNAME__,__FULLNAME__,__COMPANY__,'.
'__ADDRESS__,__ZIP__,__TOWN__,__COUNTRY__,__EMAIL__,__BIRTH__,__PHOTO__,__LOGIN__';
// If option to store clear password has been set, we get 'dolibspec' into PASSWORD field.
$expected = DOL_MAIN_URL_ROOT.','.$localobject->id.',,New firstname,New name,New firstname New name,'.
$expected = ',New firstname,New name,New firstname New name,'.
'New company,New address,New zip,New town,Belgium,newemail@newemail.com,'.dol_print_date($localobject->birth,'day').',,'.
'newlogin,dolibspec,New firstname,New name,New company,New address,New zip,New town,Belgium';
'newlogin';
$result = $localobject->makeSubstitution($template);
print __METHOD__." result=".$result."\n";