From 3e381aa5a29345136f1468e731948187d5b7fcfb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Sun, 21 May 2017 21:04:20 +0200 Subject: [PATCH] Fix phpunit --- test/phpunit/AdherentTest.php | 6 ++++-- test/phpunit/UserTest.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/phpunit/AdherentTest.php b/test/phpunit/AdherentTest.php index 42b4ff7cf7f..b998c346b7b 100644 --- a/test/phpunit/AdherentTest.php +++ b/test/phpunit/AdherentTest.php @@ -83,7 +83,9 @@ class AdherentTest extends PHPUnit_Framework_TestCase print "\n".__METHOD__." Company must be setup to have name-firstname in order 'Firstname Lastname'\n"; die(); } - + if (! empty($conf->global->MAIN_MODULE_LDAP)) { print "\n".__METHOD__." module LDAP must be disabled.\n"; die(); } + if (! empty($conf->global->MAIN_MODULE_MAILMANSPIP)) { print "\n".__METHOD__." module MailmanSpip must be disabled.\n"; die(); } + print __METHOD__."\n"; } @@ -322,7 +324,7 @@ class AdherentTest extends PHPUnit_Framework_TestCase $expected = DOL_MAIN_URL_ROOT.','.$localobject->id.',,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,,New firstname,New name,New company,New address,New zip,New town,Belgium'; $result = $localobject->makeSubstitution($template); print __METHOD__." result=".$result."\n"; diff --git a/test/phpunit/UserTest.php b/test/phpunit/UserTest.php index e0802ff17a2..b932d2e2221 100644 --- a/test/phpunit/UserTest.php +++ b/test/phpunit/UserTest.php @@ -76,7 +76,7 @@ class UserTest extends PHPUnit_Framework_TestCase { global $conf,$user,$langs,$db; - if (! empty($conf->global->MAIN_LDAP_ENABLED)) { print "\n".__METHOD__." module LDAP must be disabled.\n"; die(); } + if (! empty($conf->global->MAIN_MODULE_LDAP)) { 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. -- GitLab