diff --git a/.travis.yml b/.travis.yml index ad95172334c..6875b9bb743 100644 --- a/.travis.yml +++ b/.travis.yml @@ -290,12 +290,17 @@ 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 - echo + +- | + echo Output dolibarr.log + echo cat documents/dolibarr.log after_success: +- | + echo Success after_failure: - | @@ -315,4 +320,7 @@ after_failure: fi after_script: +- | + # Dolibarr log file + cat documents/dolibarr.log 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);