Browse Source

Add missing phpunit tests

Laurent Destailleur 9 years ago
parent
commit
547ffd7fcc
2 changed files with 6 additions and 5 deletions
  1. 3 2
      htdocs/core/modules/modProductBatch.class.php
  2. 3 3
      test/phpunit/ModulesTest.php

+ 3 - 2
htdocs/core/modules/modProductBatch.class.php

@@ -118,8 +118,9 @@ class modProductBatch extends DolibarrModules
 
 		$sql = array();
 
-		if(! empty($conf->cashdesk->enabled)) {
-    		if (!$conf->global->CASHDESK_NO_DECREASE_STOCK) {
+		if (! empty($conf->cashdesk->enabled)) {
+    		if (empty($conf->global->CASHDESK_NO_DECREASE_STOCK)) {
+    		    include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
     		    $res = dolibarr_set_const($db,"CASHDESK_NO_DECREASE_STOCK",1,'chaine',0,'',$conf->entity);
     		}
 		}

+ 3 - 3
test/phpunit/ModulesTest.php

@@ -130,10 +130,10 @@ class ModulesTest extends PHPUnit_Framework_TestCase
 		$modulelist=array('Accounting','Adherent','Agenda','Banque','Barcode','Bookmark',
 		'CashDesk','Categorie','ClickToDial','Commande','Comptabilite','Contrat','Cron','Deplacement','DocumentGeneration','Don','DynamicPrices',
 		'ECM','Expedition','Export','ExternalRss','ExternalSite',
-		'Facture','Fckeditor','Ficheinter','Fournisseur','FTP','GeoIPMaxmind','Gravatar','Holiday','Import','Label','Ldap',
+		'Facture','Fckeditor','Ficheinter','Fournisseur','FTP','GeoIPMaxmind','Gravatar','Holiday','HRM','Import','Incoterm','Label','Ldap','Loan',
 		'Mailing','MailmanSpip','Margin',
-		'Notification','OpenSurvey','Paybox','Paypal','Prelevement','Product','ProductBatch','Projet','Propale',
-		'Salaries','Service','Skype','Societe','Stock','WebServicesClient','Syslog','Tax','User','WebServices','Workflow');
+		'Notification','Oauth','OpenSurvey','Paybox','Paypal','Prelevement','Product','ProductBatch','Projet','Propale','ReceiptPrinter','Resource',
+		'Salaries','Service','Skype','Societe','Stock','SupplierProposal','Syslog','Tax','User','WebServices','WebServicesClient','Websites','Workflow');
 		foreach($modulelist as $modlabel)
 		{
     		require_once(DOL_DOCUMENT_ROOT.'/core/modules/mod'.$modlabel.'.class.php');