diff --git a/test/FactureTest.php b/test/FactureTest.php index 6a96c0e277a708d8ced90941095e67d40e1b8431..89b01092dcfd18cd7b66ef95bd4bd0baf7f4d1e0 100644 --- a/test/FactureTest.php +++ b/test/FactureTest.php @@ -26,7 +26,7 @@ //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/compta/facture/facture.class.php'; +require_once dirname(__FILE__).'/../htdocs/compta/facture/class/facture.class.php'; /** * @backupGlobals enabled diff --git a/test/FactureTestSuite.php b/test/MyTestSuite.php similarity index 91% rename from test/FactureTestSuite.php rename to test/MyTestSuite.php index aa68f01836e8f0c0d0bd59f246d5306740c0e81e..f61fd120cf0604530ba4be1ad7561c7add4662b3 100644 --- a/test/FactureTestSuite.php +++ b/test/MyTestSuite.php @@ -25,11 +25,10 @@ */ require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__).'/../htdocs/master.inc.php'; -require_once dirname(__FILE__).'/../htdocs/compta/facture/class/facture.class.php'; require_once dirname(__FILE__).'/FactureTest.php'; -class FactureTestSuite extends PHPUnit_Framework_TestSuite +class MyTestSuite extends PHPUnit_Framework_TestSuite { protected $savconf; protected $savuser; @@ -68,7 +67,7 @@ class FactureTestSuite extends PHPUnit_Framework_TestSuite public static function suite() { - return new FactureTestSuite('FactureTest'); + return new MyTestSuite('FactureTest'); } } diff --git a/test/README b/test/README index 440da106fc459a765f59323abcb53f134ab8df72..5c5d5a97d8b251d7e90333f50ef5a8f99c9cb6a5 100644 --- a/test/README +++ b/test/README @@ -1,11 +1,15 @@ README (English) -------------------------------- -This directory contains unit tests of Dolibarr code. +This directory contains unit tests for Dolibarr code. To use them, you must: + * Install PHPUnit -* Add an entry in eclipse as external tool for phpunit programm with: +If using Eclipse, you must also add an entry as external tool for phpunit programm with: -Name: PHPUnit -Location: /usr/bin/php -Workspace: ${workspace_loc} -Arguments: /usr/bin/phpunit ${resource_path} -* To run a test, select it and click on menu "Run external tools and choose PHPUnit" \ No newline at end of file + +* Run test by +Running > phpunit testfile.php +If using Eclipse, select the test and click on menu "Run external tools and choose PHPUnit".