mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
Doc
This commit is contained in:
@@ -30,11 +30,19 @@ If not using Eclipse, to install PHPUnit manually:
|
||||
> sudo pear upgrade-all
|
||||
> sudo pear install --alldeps phpunit/PHPUnit
|
||||
|
||||
|
||||
* Run Unit tests:
|
||||
> cd test/phpunit
|
||||
> phpunit MyFileTest.php
|
||||
If using Eclipse, select the test and click on menu "Run external tools and choose PHPUnit".
|
||||
|
||||
* Example to run phpunit 7.0 from composer using php version 8.0:
|
||||
> cd ~/tmp
|
||||
> composer -i phpunit
|
||||
> cd test/phpunit
|
||||
> /usr/bin/php8.0 ~/tmp/htdocs/includes/phpunit/phpunit/phpunit MyFileTest.php
|
||||
|
||||
|
||||
* Generate a report of Unit tests code coverage done by one tested class:
|
||||
> cd test
|
||||
> phpunit -d memory_limit=-1 -d max_input_time=1800 -d max_execution_time=1800 --configuration ./phpunit/phpunittest.xml --coverage-html ./report ./report/logs/phpunit.xml phpunit/MyClassTest.php
|
||||
|
||||
@@ -136,13 +136,16 @@ class ModulesTest extends PHPUnit\Framework\TestCase
|
||||
$langs=$this->savlangs;
|
||||
$db=$this->savdb;
|
||||
|
||||
$modulelist=array('Accounting','Adherent','Agenda','Api','Asset','Banque','Barcode','BlockedLog','Bookmark',
|
||||
'CashDesk','Categorie','ClickToDial','Collab','Commande','Comptabilite','Contrat','Cron','DataPolicy','Dav','Deplacement','DocumentGeneration','Don','DynamicPrices',
|
||||
'ECM','EmailCollector','Expedition','ExpenseReport','Export','ExternalRss','ExternalSite',
|
||||
'Facture','Fckeditor','Ficheinter','Fournisseur','FTP','GeoIPMaxmind','Gravatar','Holiday','HRM','Import','Incoterm','Label','Ldap','Loan',
|
||||
'Mailing','MailmanSpip','Margin','ModuleBuilder','MultiCurrency',
|
||||
'Notification','Oauth','OpenSurvey','Paybox','Paypal','Prelevement','Printing','Product','ProductBatch','Projet','Propale','ReceiptPrinter','Resource',
|
||||
'Salaries','Service','SocialNetworks','Societe','Stock','Stripe','SupplierProposal','Syslog','TakePos','Tax','Ticket','User','Variants','WebServices','WebServicesClient','Website','Workflow');
|
||||
$modulelist=array('Accounting','Adherent','Agenda','Api','Asset','Banque','Barcode','BlockedLog','Bom','Bookmark',
|
||||
'Categorie','ClickToDial','Collab','Commande','Comptabilite','Contrat','Cron','DataPolicy','Dav','DebugBar','Deplacement','DocumentGeneration','Don','DynamicPrices',
|
||||
'ECM','EmailCollector','EventOrganization','Expedition','ExpenseReport','Export','ExternalRss','ExternalSite',
|
||||
'Facture','Fckeditor','Ficheinter','Fournisseur','FTP','GeoIPMaxmind','Gravatar','Holiday','HRM','Import','Incoterm','Intracommreport',
|
||||
'KnowledgeManagement','Label','Ldap','Loan',
|
||||
'Mailing','MailmanSpip','Margin','ModuleBuilder','Mrp','MultiCurrency',
|
||||
'Notification','Oauth','OpenSurvey','Paybox','PaymentByBankTransfer','Paypal','Prelevement','Printing','Product','ProductBatch','Projet','Propale',
|
||||
'ReceiptPrinter','Reception','Recruitment','Resource',
|
||||
'Salaries','Service','SocialNetworks','Societe','Stock','Stripe','SupplierProposal','Syslog',
|
||||
'TakePos','Tax','Ticket','User','Variants','WebServices','WebServicesClient','Website','Workflow','Workstation','Zapier');
|
||||
foreach ($modulelist as $modlabel) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/mod'.$modlabel.'.class.php';
|
||||
$class='mod'.$modlabel;
|
||||
|
||||
Reference in New Issue
Block a user