Skip to content
Snippets Groups Projects
Commit d3c0d013 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

New: First change to add PHPUnit

parent d30c1784
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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');
}
}
......
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".
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment