diff --git a/test/phpunit/AdherentTest.php b/test/phpunit/AdherentTest.php index 6fb709f97c0..b4f475bd27b 100644 --- a/test/phpunit/AdherentTest.php +++ b/test/phpunit/AdherentTest.php @@ -40,14 +40,15 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; /** + * @xcovers DoliDb + * @xcovers Translate + * @xcovers Conf + * @xcovers Interfaces + * @xcovers CommonObject + * @xcovers Adherent + * * @backupGlobals disabled * @backupStaticAttributes enabled - * @covers DoliDb - * @covers Translate - * @covers Conf - * @covers Interfaces - * @covers CommonObject - * @covers Adherent * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ class AdherentTest extends PHPUnit_Framework_TestCase diff --git a/test/phpunit/BuildDocTest.php b/test/phpunit/BuildDocTest.php index e7b6431b3f2..efce1abed94 100644 --- a/test/phpunit/BuildDocTest.php +++ b/test/phpunit/BuildDocTest.php @@ -35,6 +35,24 @@ require_once dirname(__FILE__).'/../../htdocs/fichinter/class/fichinter.class.ph require_once dirname(__FILE__).'/../../htdocs/expedition/class/expedition.class.php'; require_once dirname(__FILE__).'/../../htdocs/projet/class/project.class.php'; require_once dirname(__FILE__).'/../../htdocs/projet/class/task.class.php'; +require_once dirname(__FILE__).'/../../htdocs/lib/pdf.lib.php'; +require_once dirname(__FILE__).'/../../htdocs/includes/modules/facture/pdf_crabe.modules.php'; +require_once dirname(__FILE__).'/../../htdocs/includes/modules/facture/pdf_oursin.modules.php'; +require_once dirname(__FILE__).'/../../htdocs/includes/modules/commande/pdf_edison.modules.php'; +require_once dirname(__FILE__).'/../../htdocs/includes/modules/commande/pdf_einstein.modules.php'; +require_once dirname(__FILE__).'/../../htdocs/includes/modules/propale/pdf_propale_azur.modules.php'; +require_once dirname(__FILE__).'/../../htdocs/includes/modules/propale/pdf_propale_jaune.modules.php'; +require_once dirname(__FILE__).'/../../htdocs/includes/modules/project/pdf/pdf_baleine.modules.php'; +require_once dirname(__FILE__).'/../../htdocs/includes/modules/fichinter/pdf_soleil.modules.php'; +require_once dirname(__FILE__).'/../../htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php'; +require_once dirname(__FILE__).'/../../htdocs/includes/modules/expedition/pdf/pdf_expedition_rouget.modules.php'; +// Mother classes of pdf generators +require_once dirname(__FILE__).'/../../htdocs/includes/modules/facture/modules_facture.php'; +require_once dirname(__FILE__).'/../../htdocs/includes/modules/commande/modules_commande.php'; +require_once dirname(__FILE__).'/../../htdocs/includes/modules/propale/modules_propale.php'; +require_once dirname(__FILE__).'/../../htdocs/includes/modules/project/modules_project.php'; +require_once dirname(__FILE__).'/../../htdocs/includes/modules/fichinter/modules_fichinter.php'; +require_once dirname(__FILE__).'/../../htdocs/includes/modules/expedition/pdf/ModelePdfExpedition.class.php'; if (empty($user->id)) { @@ -46,19 +64,42 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; /** + * @xcovers DoliDb + * @xcovers User + * @xcovers Translate + * @xcovers Conf + * @xcovers CommonObject + * @xcovers Facture + * @xcovers Commande + * @xcovers Propal + * @xcovers Expedition + * @xcovers Fichinter + * @xcovers Project + * + * @xcovers ModelePDFFactures + * @xcovers pdf_crabe + * @xcovers pdf_oursin + * + * @xcovers ModelePDFCommandes + * @xcovers pdf_edison + * @xcovers pdf_einstein + * + * @xcovers ModelePDFPropales + * @xcovers pdf_propale_azur + * @xcovers pdf_propale_jaune + * + * @xcovers ModelePDFProjects + * @xcovers pdf_baleine + * + * @xcovers ModelePDFFicheinter + * @xcovers pdf_soleil + * + * @xcovers ModelePDFExpedition + * @xcovers pdf_expedition_merou + * @xcovers pdf_expedition_rouget + * * @backupGlobals disabled * @backupStaticAttributes enabled - * @covers DoliDb - * @covers User - * @covers Translate - * @covers Conf - * @covers CommonObject - * @covers Facture - * @covers Commande - * @covers Propal - * @covers Expedition - * @covers Fichinter - * @covers Project * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ class BuildDocTest extends PHPUnit_Framework_TestCase @@ -124,9 +165,6 @@ class BuildDocTest extends PHPUnit_Framework_TestCase } /** - * @covers ModelePDFFactures - * @covers pdf_crabe - * @covers pdf_oursin */ public function testFactureBuild() { @@ -136,7 +174,6 @@ class BuildDocTest extends PHPUnit_Framework_TestCase $langs=$this->savlangs; $db=$this->savdb; - require_once(DOL_DOCUMENT_ROOT.'/includes/modules/facture/modules_facture.php'); $conf->facture->dir_output.='/temp'; $localobject=new Facture($this->savdb); $localobject->initAsSpecimen(); @@ -160,9 +197,6 @@ class BuildDocTest extends PHPUnit_Framework_TestCase } /** - * @covers ModelePDFCommandes - * @covers pdf_edison - * @covers pdf_einstein */ public function testCommandeBuild() { @@ -172,7 +206,6 @@ class BuildDocTest extends PHPUnit_Framework_TestCase $langs=$this->savlangs; $db=$this->savdb; - require_once(DOL_DOCUMENT_ROOT.'/includes/modules/commande/modules_commande.php'); $conf->commande->dir_output.='/temp'; $localobject=new Commande($this->savdb); $localobject->initAsSpecimen(); @@ -196,9 +229,6 @@ class BuildDocTest extends PHPUnit_Framework_TestCase } /** - * @covers ModelePDFPropales - * @covers pdf_propale_azur - * @covers pdf_propale_jaune */ public function testPropalBuild() { @@ -208,7 +238,6 @@ class BuildDocTest extends PHPUnit_Framework_TestCase $langs=$this->savlangs; $db=$this->savdb; - require_once(DOL_DOCUMENT_ROOT.'/includes/modules/propale/modules_propale.php'); $conf->propale->dir_output.='/temp'; $localobject=new Propal($this->savdb); $localobject->initAsSpecimen(); @@ -232,8 +261,6 @@ class BuildDocTest extends PHPUnit_Framework_TestCase } /** - * @covers ModelePDFProjects - * @covers pdf_baleine */ public function testProjectBuild() { @@ -243,7 +270,6 @@ class BuildDocTest extends PHPUnit_Framework_TestCase $langs=$this->savlangs; $db=$this->savdb; - require_once(DOL_DOCUMENT_ROOT.'/includes/modules/project/modules_project.php'); $conf->project->dir_output.='/temp'; $localobject=new Project($this->savdb); $localobject->initAsSpecimen(); @@ -260,8 +286,6 @@ class BuildDocTest extends PHPUnit_Framework_TestCase } /** - * @covers ModelePDFFicheinter - * @covers pdf_soleil */ public function testFichinterBuild() { @@ -271,7 +295,6 @@ class BuildDocTest extends PHPUnit_Framework_TestCase $langs=$this->savlangs; $db=$this->savdb; - require_once(DOL_DOCUMENT_ROOT.'/includes/modules/fichinter/modules_fichinter.php'); $conf->fichinter->dir_output.='/temp'; $localobject=new Fichinter($this->savdb); $localobject->initAsSpecimen(); @@ -288,9 +311,6 @@ class BuildDocTest extends PHPUnit_Framework_TestCase } /** - * @covers ModelePDFExpedition - * @covers pdf_expedition_merou - * @covers pdf_expedition_rouget */ public function testExpeditionBuild() { @@ -300,7 +320,6 @@ class BuildDocTest extends PHPUnit_Framework_TestCase $langs=$this->savlangs; $db=$this->savdb; - require_once(DOL_DOCUMENT_ROOT.'/includes/modules/expedition/pdf/ModelePdfExpedition.class.php'); $conf->expedition->dir_output.='/temp'; $localobject=new Expedition($this->savdb); $localobject->initAsSpecimen(); diff --git a/test/phpunit/CMailFileTest.php b/test/phpunit/CMailFileTest.php new file mode 100755 index 00000000000..22772c75c65 --- /dev/null +++ b/test/phpunit/CMailFileTest.php @@ -0,0 +1,162 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * \file test/phpunit/CMailFileTest.php + * \ingroup test + * \brief PHPUnit test + * \version $Id$ + * \remarks To run this script as CLI: phpunit filename.php + */ + +global $conf,$user,$langs,$db; +//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver +require_once 'PHPUnit/Framework.php'; +require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; +require_once dirname(__FILE__).'/../../htdocs/lib/CMailFile.class.php'; + +if (empty($user->id)) +{ + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); +} +$conf->global->MAIN_DISABLE_ALL_MAILS=1; + + +/** + * @xcovers DoliDb + * @xcovers Translate + * @xcovers Conf + * @xcovers Interfaces + * @xcovers CommonObject + * @xcovers Adherent + * + * @backupGlobals disabled + * @backupStaticAttributes enabled + * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. + */ +class CMailFileTest extends PHPUnit_Framework_TestCase +{ + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; + + /** + * Constructor + * We save global variables into local variables + * + * @return CMailFile + */ + function CMailFileTest() + { + //$this->sharedFixture + global $conf,$user,$langs,$db; + $this->savconf=$conf; + $this->savuser=$user; + $this->savlangs=$langs; + $this->savdb=$db; + + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } + + // Static methods + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + + print __METHOD__."\n"; + } + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); + + print __METHOD__."\n"; + } + + /** + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + print __METHOD__."\n"; + } + /** + */ + protected function tearDown() + { + print __METHOD__."\n"; + } + + /** + */ + public function testCMailFileText() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $localobject=new CMailFile('Test','test@test.com','from@from.com', + 'Message txt',array(),array(),array(),'','',1,0); + + $result=$localobject->sendfile(); + print __METHOD__." result=".$result."\n"; + $this->assertFalse($result); // False because mail send disabled + + return $result; + } + + /** + */ + public function testCMailFileStatic() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $localobject=new CMailFile('','','',''); + + $src='John Doe '; + $result=$localobject->getValidAddress($src,1); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result,''); + + $src='John Doe '; + $result=$localobject->getValidAddress($src,2); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result,'john@doe.com'); + + return $result; + } + +} +?> \ No newline at end of file diff --git a/test/phpunit/CategorieTest.php b/test/phpunit/CategorieTest.php index 2e1144a2d46..8ac54d0b953 100755 --- a/test/phpunit/CategorieTest.php +++ b/test/phpunit/CategorieTest.php @@ -40,14 +40,15 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; /** + * @xcovers DoliDb + * @xcovers Translate + * @xcovers Conf + * @xcovers Interfaces + * @xcovers CommonObject + * @xcovers Categorie + * * @backupGlobals disabled * @backupStaticAttributes enabled - * @covers DoliDb - * @covers Translate - * @covers Conf - * @covers Interfaces - * @covers CommonObject - * @covers Categorie * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ class CategorieTest extends PHPUnit_Framework_TestCase diff --git a/test/phpunit/ChargeSocialesTest.php b/test/phpunit/ChargeSocialesTest.php index 0fd8dd129ae..ca920409f43 100755 --- a/test/phpunit/ChargeSocialesTest.php +++ b/test/phpunit/ChargeSocialesTest.php @@ -40,14 +40,15 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; /** + * @xcovers DoliDb + * @xcovers Translate + * @xcovers Conf + * @xcovers Interfaces + * @xcovers CommonObject + * @xcovers ChargeSociales + * * @backupGlobals disabled * @backupStaticAttributes enabled - * @covers DoliDb - * @covers Translate - * @covers Conf - * @covers Interfaces - * @covers CommonObject - * @covers ChargeSociales * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ class ChargeSocialesTest extends PHPUnit_Framework_TestCase diff --git a/test/phpunit/CommandeFournisseurTest.php b/test/phpunit/CommandeFournisseurTest.php index f78bdd40b05..fcb107f4d70 100644 --- a/test/phpunit/CommandeFournisseurTest.php +++ b/test/phpunit/CommandeFournisseurTest.php @@ -41,10 +41,11 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; /** + * @xcovers CommandeFournisseur + * @xcovers CommandeFournisseurLigne + * * @backupGlobals disabled * @backupStaticAttributes enabled - * @covers CommandeFournisseur - * @covers CommandeFournisseurLigne * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase diff --git a/test/phpunit/CommandeTest.php b/test/phpunit/CommandeTest.php index 9c5950b93c1..cc2612e0fd0 100644 --- a/test/phpunit/CommandeTest.php +++ b/test/phpunit/CommandeTest.php @@ -40,10 +40,11 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; /** + * @xcovers Commande + * @xcovers OrderLine + * * @backupGlobals disabled * @backupStaticAttributes enabled - * @covers Commande - * @covers OrderLine * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ class CommandeTest extends PHPUnit_Framework_TestCase diff --git a/test/phpunit/CommonObjectTest.php b/test/phpunit/CommonObjectTest.php index 17048356a0a..8f65a72c6bb 100644 --- a/test/phpunit/CommonObjectTest.php +++ b/test/phpunit/CommonObjectTest.php @@ -41,13 +41,14 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; /** + * @xcovers DoliDb + * @xcovers User + * @xcovers Translate + * @xcovers Conf + * @xcovers CommonObject + * * @backupGlobals disabled * @backupStaticAttributes enabled - * @covers DoliDb - * @covers User - * @covers Translate - * @covers Conf - * @covers CommonObject * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ class CommonObjectTest extends PHPUnit_Framework_TestCase diff --git a/test/phpunit/CompanyBankAccountTest.php b/test/phpunit/CompanyBankAccountTest.php index ac5141679ce..6bacd164d65 100644 --- a/test/phpunit/CompanyBankAccountTest.php +++ b/test/phpunit/CompanyBankAccountTest.php @@ -40,9 +40,10 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; /** + * @xcovers CompanyBankAccount + * * @backupGlobals disabled * @backupStaticAttributes enabled - * @covers CompanyBankAccount * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase diff --git a/test/phpunit/ContratTest.php b/test/phpunit/ContratTest.php index 247366038eb..a1dfa4fcbef 100644 --- a/test/phpunit/ContratTest.php +++ b/test/phpunit/ContratTest.php @@ -40,15 +40,16 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; /** + * @xcovers DoliDb + * @xcovers Translate + * @xcovers Conf + * @xcovers Interfaces + * @xcovers CommonObject + * @xcovers Contrat + * @xcovers ContratLigne + * * @backupGlobals disabled * @backupStaticAttributes enabled - * @covers DoliDb - * @covers Translate - * @covers Conf - * @covers Interfaces - * @covers CommonObject - * @covers Contrat - * @covers ContratLigne * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ class ContratTest extends PHPUnit_Framework_TestCase diff --git a/test/phpunit/DateLibTest.php b/test/phpunit/DateLibTest.php index 64c53df58af..00658a96789 100644 --- a/test/phpunit/DateLibTest.php +++ b/test/phpunit/DateLibTest.php @@ -40,6 +40,8 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; /** + * When not cover is provided. We use everything. + * * @backupGlobals disabled * @backupStaticAttributes enabled * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. diff --git a/test/phpunit/FactureFournisseurTest.php b/test/phpunit/FactureFournisseurTest.php index 89225e40e34..48430c21d10 100644 --- a/test/phpunit/FactureFournisseurTest.php +++ b/test/phpunit/FactureFournisseurTest.php @@ -40,15 +40,16 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; /** + * @xcovers DoliDb + * @xcovers User + * @xcovers Translate + * @xcovers Conf + * @xcovers Interfaces + * @xcovers CommonObject + * @xcovers FactureFournisseur + * * @backupGlobals disabled * @backupStaticAttributes enabled - * @covers DoliDb - * @covers User - * @covers Translate - * @covers Conf - * @covers Interfaces - * @covers CommonObject - * @covers FactureFournisseur * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ class FactureFournisseurTest extends PHPUnit_Framework_TestCase diff --git a/test/phpunit/FactureTest.php b/test/phpunit/FactureTest.php index 7bc52f0c5bc..2bdc94e7b16 100644 --- a/test/phpunit/FactureTest.php +++ b/test/phpunit/FactureTest.php @@ -40,24 +40,25 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; /** + * @xcovers DoliDb + * @xcovers User + * @xcovers Translate + * @xcovers Conf + * @xcovers Interfaces + * @xcovers CommonObject + * @xcovers Facture + * @xcovers FactureLigne + * @xcovers ModeleNumRefFactures + * @xcovers InterfaceLogevents + * @xcovers InterfaceActionsAuto + * @xcovers InterfaceLdapsynchro + * @xcovers InterfaceNotification + * @xcovers InterfacePhenixsynchro + * @xcovers InterfacePropalWorkflow + * @xcovers InterfaceWebcalsynchro + * * @backupGlobals disabled * @backupStaticAttributes enabled - * @covers DoliDb - * @covers User - * @covers Translate - * @covers Conf - * @covers Interfaces - * @covers CommonObject - * @covers Facture - * @covers FactureLigne - * @covers ModeleNumRefFactures - * @covers InterfaceLogevents - * @covers InterfaceActionsAuto - * @covers InterfaceLdapsynchro - * @covers InterfaceNotification - * @covers InterfacePhenixsynchro - * @covers InterfacePropalWorkflow - * @covers InterfaceWebcalsynchro * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ class FactureTest extends PHPUnit_Framework_TestCase diff --git a/test/phpunit/ModulesTest.php b/test/phpunit/ModulesTest.php index 6ab6b38fcf3..99443e4b8ac 100755 --- a/test/phpunit/ModulesTest.php +++ b/test/phpunit/ModulesTest.php @@ -39,59 +39,60 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; /** + * @xcovers DolibarrModules + * @xcovers modAccounting + * @xcovers modAdherent + * @xcovers modAgenda + * @xcovers modBanque + * @xcovers modBarcode + * @xcovers modBookmark + * @xcovers modBoutique + * @xcovers modCashDesk + * @xcovers modCategorie + * @xcovers modClickToDial + * @xcovers modCommande + * @xcovers modComptabilite + * @xcovers modContrat + * @xcovers modDeplacement + * @xcovers modDocument + * @xcovers modDomain + * @xcovers modDon + * @xcovers modECM + * @xcovers modExpedition + * @xcovers modExport + * @xcovers modExternalRss + * @xcovers modExternalSite + * @cxovers modFacture + * @xcovers modFckeditor + * @xcovers modFicheinter + * @xcovers modFournisseur + * @xcovers modFTP + * @xcovers modGeoIPMaxmind + * @xcovers modGravatar + * @xcovers modImport + * @xcovers modLabel + * @xcovers modLdap + * @xcovers modMailing + * @xcovers modMantis + * @xcovers modNotification + * @xcovers modPaybox + * @xcovers modPaypal + * @xcovers modPhenix + * @xcovers modPrelevement + * @xcovers modProduct + * @xcovers modProjet + * @xcovers modPropale + * @xcovers modService + * @xcovers modSociete + * @xcovers modStock + * @xcovers modSyslog + * @xcovers modTax + * @xcovers modUser + * @xcovers modWebcalendar + * @xcovers modWebServices + * * @backupGlobals disabled * @backupStaticAttributes enabled - * @covers DolibarrModules - * @covers modAccounting - * @covers modAdherent - * @covers modAgenda - * @covers modBanque - * @covers modBarcode - * @covers modBookmark - * @covers modBoutique - * @covers modCashDesk - * @covers modCategorie - * @covers modClickToDial - * @covers modCommande - * @covers modComptabilite - * @covers modContrat - * @covers modDeplacement - * @covers modDocument - * @covers modDomain - * @covers modDon - * @covers modECM - * @covers modExpedition - * @covers modExport - * @covers modExternalRss - * @covers modExternalSite - * @covers modFacture - * @covers modFckeditor - * @covers modFicheinter - * @covers modFournisseur - * @covers modFTP - * @covers modGeoIPMaxmind - * @covers modGravatar - * @covers modImport - * @covers modLabel - * @covers modLdap - * @covers modMailing - * @covers modMantis - * @covers modNotification - * @covers modPaybox - * @covers modPaypal - * @covers modPhenix - * @covers modPrelevement - * @covers modProduct - * @covers modProjet - * @covers modPropale - * @covers modService - * @covers modSociete - * @covers modStock - * @covers modSyslog - * @covers modTax - * @covers modUser - * @covers modWebcalendar - * @covers modWebServices * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ class ModulesTest extends PHPUnit_Framework_TestCase diff --git a/test/phpunit/MyTestSuite.php b/test/phpunit/MyTestSuite.php index 413430c6ffd..59cb01b6ee3 100644 --- a/test/phpunit/MyTestSuite.php +++ b/test/phpunit/MyTestSuite.php @@ -89,6 +89,8 @@ class MyTestSuite require_once dirname(__FILE__).'/ModulesTest.php'; $suite->addTestSuite('ModulesTest'); + require_once dirname(__FILE__).'/CMailFileTest.php'; + $suite->addTestSuite('CMailFileTest'); return $suite; } diff --git a/test/phpunit/PropalTest.php b/test/phpunit/PropalTest.php index ed63b867400..b6752db37b3 100644 --- a/test/phpunit/PropalTest.php +++ b/test/phpunit/PropalTest.php @@ -40,10 +40,11 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; /** + * @xcovers Propal + * @xcovers PropaleLigne + * * @backupGlobals disabled * @backupStaticAttributes enabled - * @covers Propal - * @covers PropaleLigne * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ class PropalTest extends PHPUnit_Framework_TestCase diff --git a/test/phpunit/SocieteTest.php b/test/phpunit/SocieteTest.php index 38dc57dac8a..4598eab552d 100755 --- a/test/phpunit/SocieteTest.php +++ b/test/phpunit/SocieteTest.php @@ -40,11 +40,12 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; /** + * @xcovers DoliDb + * @xcovers Conf + * @xcovers Societe + * * @backupGlobals disabled * @backupStaticAttributes enabled - * @covers DoliDb - * @covers Conf - * @covers Societe * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ class SocieteTest extends PHPUnit_Framework_TestCase diff --git a/test/phpunit/UserGroupTest.php b/test/phpunit/UserGroupTest.php index f6b74cb8bc0..8b3dea5cfab 100644 --- a/test/phpunit/UserGroupTest.php +++ b/test/phpunit/UserGroupTest.php @@ -40,14 +40,15 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; /** + * @xcovers DoliDb + * @xcovers Translate + * @xcovers Conf + * @xcovers Interfaces + * @xcovers CommonObject + * @xcovers UserGroup + * * @backupGlobals disabled * @backupStaticAttributes enabled - * @covers DoliDb - * @covers Translate - * @covers Conf - * @covers Interfaces - * @covers CommonObject - * @covers UserGroup * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ class UserGroupTest extends PHPUnit_Framework_TestCase diff --git a/test/phpunit/UserTest.php b/test/phpunit/UserTest.php index 147636bdade..63398ac66f6 100644 --- a/test/phpunit/UserTest.php +++ b/test/phpunit/UserTest.php @@ -40,14 +40,15 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; /** + * @xcovers DoliDb + * @xcovers Translate + * @xcovers Conf + * @xcovers Interfaces + * @xcovers CommonObject + * @xcovers User + * * @backupGlobals disabled * @backupStaticAttributes enabled - * @covers DoliDb - * @covers Translate - * @covers Conf - * @covers Interfaces - * @covers CommonObject - * @covers User * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ class UserTest extends PHPUnit_Framework_TestCase diff --git a/test/phpunit/phpunittest.xml b/test/phpunit/phpunittest.xml index c3644e23ed9..3fe4bd221c9 100644 --- a/test/phpunit/phpunittest.xml +++ b/test/phpunit/phpunittest.xml @@ -19,6 +19,7 @@ ../../htdocs/includes/odtphp/ ../../htdocs/includes/php_excelreader/ ../../htdocs/includes/php_writeexcel/ + ../../htdocs/includes/scriptaculous/ ../../htdocs/includes/smarty/ ../../htdocs/includes/smtps/ ../../htdocs/includes/tcpdf/ @@ -34,6 +35,11 @@ ../../htdocs/ ../../htdocs/ ../../htdocs/includes/modules/facture/modules_facture.php + ../../htdocs/includes/modules/commande/modules_commande.php + ../../htdocs/includes/modules/propale/modules_propale.php + ../../htdocs/includes/modules/project/modules_project.php + ../../htdocs/includes/modules/fichinter/modules_fichinter.php + \ No newline at end of file