From 05a1a45232ce950b58904ae45864d3ecc5cd3ecf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 5 May 2010 18:18:09 +0000 Subject: [PATCH] Update unit tests --- test/CommonObjectTest.php | 1 - test/MyTestSuite.php | 4 ++-- test/README | 2 ++ test/phpunittest.xml | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/CommonObjectTest.php b/test/CommonObjectTest.php index d08c3a24f92..27fb80e491f 100644 --- a/test/CommonObjectTest.php +++ b/test/CommonObjectTest.php @@ -46,7 +46,6 @@ if (empty($user->id)) * @covers User * @covers Translate * @covers Conf - * @covers Interfaces * @covers CommonObject * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ diff --git a/test/MyTestSuite.php b/test/MyTestSuite.php index dfb3571eb2c..27e353783a7 100644 --- a/test/MyTestSuite.php +++ b/test/MyTestSuite.php @@ -48,8 +48,8 @@ class MyTestSuite { $suite = new PHPUnit_Framework_TestSuite('PHPUnit Framework'); - require_once dirname(__FILE__).'/CommonObjectTest.php'; - $suite->addTestSuite('CommonObjectTest'); +// require_once dirname(__FILE__).'/CommonObjectTest.php'; +// $suite->addTestSuite('CommonObjectTest'); require_once dirname(__FILE__).'/AdherentTest.php'; $suite->addTestSuite('AdherentTest'); diff --git a/test/README b/test/README index 52b60cc9b4e..747c90c2382 100644 --- a/test/README +++ b/test/README @@ -22,5 +22,7 @@ Note that xdebug must be installed for this feature to work. * Generate a report of Unit tests code coverage among all Dolibarr classes: Increase your PHP memory (memory_limit in php.ini) to 528MB. +Check that you use the "mysqli" driver in your conf.php file (otherwise +edit the file phpunittest.xml). Run > phpunit --configuration ./phpunittest.xml --coverage-html ./report MyTestSuite.php diff --git a/test/phpunittest.xml b/test/phpunittest.xml index 24615186bfb..0d7e558be8b 100644 --- a/test/phpunittest.xml +++ b/test/phpunittest.xml @@ -8,6 +8,7 @@ ../htdocs/lib/databases/mssql.lib.php ../htdocs/lib/databases/pgsql.lib.php ../htdocs/lib/databases/mysql.lib.php + ../htdocs/