From 1d9acd6a2451bcd234dd2cf26afc8b11470d886c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 Feb 2016 12:53:45 +0100 Subject: [PATCH 1/4] Debug --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ad95172334c..f1c8d66957c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -293,9 +293,12 @@ script: set -e phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php set +e - echo + echo Output dolibarr.log + echo cat documents/dolibarr.log after_success: +- | + echo Success after_failure: - | @@ -315,4 +318,7 @@ after_failure: fi after_script: +- | + # Dolibarr log file + cat documents/dolibarr.log From a67f52e491337efe8f4121895f4bdd61ac092ab1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 Feb 2016 13:00:30 +0100 Subject: [PATCH 2/4] Fix php unit to work both with old and new setup --- test/phpunit/FunctionsLibTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/phpunit/FunctionsLibTest.php b/test/phpunit/FunctionsLibTest.php index 49400c119a5..79bcc931c84 100644 --- a/test/phpunit/FunctionsLibTest.php +++ b/test/phpunit/FunctionsLibTest.php @@ -853,8 +853,8 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase // Test RULE ES-ES $vat1=get_default_localtax($companyes,$companyes,1,0); $vat2=get_default_localtax($companyes,$companyes,2,0); - $this->assertEquals(5.2,$vat1); - $this->assertEquals(-19,$vat2); + $this->assertEquals($vat1, 5.2); + $this->assertStringStartsWith((string) $vat2, '-19:-15:-9'); // Can be -19 (old version) or '-19:-15:-9' (new setup) // Test RULE ES-IT $vat1=get_default_localtax($companyes,$companyit,1,0); From cd16784b2b0c4dedcec414300556ee45b5327f13 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 Feb 2016 13:05:26 +0100 Subject: [PATCH 3/4] Another travis test --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index f1c8d66957c..1563375dd7d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -293,6 +293,8 @@ script: set -e phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php set +e + +- | echo Output dolibarr.log echo cat documents/dolibarr.log From dcff643fb6cc194fc1eece9a7519a8a25a960625 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 Feb 2016 13:06:46 +0100 Subject: [PATCH 4/4] We don't want to exit if error on phpunit --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1563375dd7d..6875b9bb743 100644 --- a/.travis.yml +++ b/.travis.yml @@ -290,7 +290,7 @@ script: - | echo "Unit testing" # Ensure we catch errors - set -e + set +e phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php set +e