From 8092a127a9e8e9aaada796374421cd133029144a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 13 Feb 2011 17:49:41 +0000 Subject: [PATCH] Enhance phpunits --- test/{phpunit => }/README | 4 +- test/phpunit/phpunittest.xml | 73 ++++++++++++++++++++++++------------ 2 files changed, 52 insertions(+), 25 deletions(-) rename test/{phpunit => }/README (91%) diff --git a/test/phpunit/README b/test/README similarity index 91% rename from test/phpunit/README rename to test/README index 5e3c648334b..f290ab0ea5a 100644 --- a/test/phpunit/README +++ b/test/README @@ -26,7 +26,7 @@ If using Eclipse, select the test and click on menu "Run external tools and choo * Generate a report of Unit tests code coverage among tested classes only: > cd test -> phpunit -d memory_limit=-1 --configuration ./phpunit/phpunittest.xml --coverage-html ./report --coverage-clover ./report/logs/phpunit.coverage.xml --log-junit ./report/logs/phpunit.xml MyClassTest.php +> phpunit -d memory_limit=-1 --configuration ./phpunit/phpunittest.xml --coverage-html ./report --coverage-clover ./report/logs/phpunit.coverage.xml --log-junit ./report/logs/phpunit.xml phpunit/MyClassTest.php Note that xdebug must be installed for this feature to work. * Generate a report of Unit tests code coverage among all Dolibarr classes: @@ -34,7 +34,7 @@ Increase your PHP memory (memory_limit in php.ini) to 512MB. Check that you use the "mysqli" driver in your conf.php file (otherwise edit the file phpunittest.xml). > cd test -> phpunit -d memory_limit=-1 --configuration ./phpunit/phpunittest.xml --coverage-html ./report --coverage-clover ./report/logs/phpunit.coverage.xml --log-junit ./report/logs/phpunit.xml AllTests.php +> phpunit -d memory_limit=-1 --configuration ./phpunit/phpunittest.xml --coverage-html ./report --coverage-clover ./report/logs/phpunit.coverage.xml --log-junit ./report/logs/phpunit.xml phpunit/AllTests.php diff --git a/test/phpunit/phpunittest.xml b/test/phpunit/phpunittest.xml index d45b89c8494..27dd6a47bae 100644 --- a/test/phpunit/phpunittest.xml +++ b/test/phpunit/phpunittest.xml @@ -3,29 +3,28 @@ - /home/ldestail/workspace/dolibarr/htdocs/includes/smarty/libs/ - ../CVS/ - ../../test/ - ../../htdocs/includes/adodbtime/ - ../../htdocs/includes/artichow/ - ../../htdocs/includes/barcode/php-barcode/ - ../../htdocs/includes/efc_xfss/ - ../../htdocs/includes/fckeditor/ - ../../htdocs/includes/fpdf/ - ../../htdocs/includes/geoip/ - ../../htdocs/includes/jcrop/ - ../../htdocs/includes/jquery/ - ../../htdocs/includes/jsgantt/ - ../../htdocs/includes/magpierss/ - ../../htdocs/includes/nusoap/ - ../../htdocs/includes/odtphp/ - ../../htdocs/includes/php_excelreader/ - ../../htdocs/includes/php_writeexcel/ - ../../htdocs/includes/smarty/ - ../../htdocs/includes/smtps/ - ../../htdocs/includes/tcpdf/ - ../../htdocs/includes/vcard/ - ../../htdocs/includes/menus/smartphone/ + ../CVS/ + ../../test/ + ../../htdocs/includes/adodbtime/ + ../../htdocs/includes/artichow/ + ../../htdocs/includes/barcode/php-barcode/ + ../../htdocs/includes/efc_xfss/ + ../../htdocs/includes/fckeditor/ + ../../htdocs/includes/fpdf/ + ../../htdocs/includes/geoip/ + ../../htdocs/includes/jcrop/ + ../../htdocs/includes/jquery/ + ../../htdocs/includes/jsgantt/ + ../../htdocs/includes/magpierss/ + ../../htdocs/includes/menus/smartphone/ + ../../htdocs/includes/nusoap/ + ../../htdocs/includes/odtphp/ + ../../htdocs/includes/php_excelreader/ + ../../htdocs/includes/php_writeexcel/ + ../../htdocs/includes/smarty/ + ../../htdocs/includes/smtps/ + ../../htdocs/includes/tcpdf/ + ../../htdocs/includes/vcard/ ../../htdocs/lib/databases/mssql.lib.php ../../htdocs/lib/databases/pgsql.lib.php ../../htdocs/lib/databases/mysql.lib.php @@ -40,6 +39,34 @@ ../../htdocs/includes/modules/propale/modules_propale.php ../../htdocs/includes/modules/project/modules_project.php ../../htdocs/includes/modules/fichinter/modules_fichinter.php + + ../CVS/ + ../../test/ + ../../htdocs/includes/adodbtime/ + ../../htdocs/includes/artichow/ + ../../htdocs/includes/barcode/php-barcode/ + ../../htdocs/includes/efc_xfss/ + ../../htdocs/includes/fckeditor/ + ../../htdocs/includes/fpdf/ + ../../htdocs/includes/geoip/ + ../../htdocs/includes/jcrop/ + ../../htdocs/includes/jquery/ + ../../htdocs/includes/jsgantt/ + ../../htdocs/includes/magpierss/ + ../../htdocs/includes/menus/smartphone + ../../htdocs/includes/nusoap/ + ../../htdocs/includes/odtphp/ + ../../htdocs/includes/php_excelreader/ + ../../htdocs/includes/php_writeexcel/ + ../../htdocs/includes/smarty/ + ../../htdocs/includes/smtps/ + ../../htdocs/includes/tcpdf/ + ../../htdocs/includes/vcard/ + ../../htdocs/lib/databases/mssql.lib.php + ../../htdocs/lib/databases/pgsql.lib.php + ../../htdocs/lib/databases/mysql.lib.php + + \ No newline at end of file