瀏覽代碼

Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0

Laurent Destailleur 2 年之前
父節點
當前提交
c7ae67a9be
共有 3 個文件被更改,包括 8 次插入6 次删除
  1. 4 4
      .travis.yml
  2. 2 0
      test/phpunit/AdminLibTest.php
  3. 2 2
      test/phpunit/phpunittest.xml

+ 4 - 4
.travis.yml

@@ -82,13 +82,13 @@ before_install:
 
 install:
 - |
-  echo "Updating Composer"
+  echo "Updating Composer (version 2.5 is bugged and generate phpunit error Exception: Serialization of 'Closure' is not allowed)"
   rm $TRAVIS_BUILD_DIR/composer.json
   rm $TRAVIS_BUILD_DIR/composer.lock
   composer -V
-  composer self-update
-  composer -n init
-  composer -n config vendor-dir htdocs/includes
+  composer self-update 2.4.4
+  #composer -n init
+  #composer -n config vendor-dir htdocs/includes
   composer -n config -g vendor-dir htdocs/includes
   echo
 

+ 2 - 0
test/phpunit/AdminLibTest.php

@@ -46,6 +46,7 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
  */
 class AdminLibTest extends PHPUnit\Framework\TestCase
 {
+	protected $backupGlobalsBlacklist = array('conf', 'user', 'langs', 'db');
 	protected $savconf;
 	protected $savuser;
 	protected $savlangs;
@@ -69,6 +70,7 @@ class AdminLibTest extends PHPUnit\Framework\TestCase
 		$this->savdb=$db;
 
 		print __METHOD__." db->type=".$db->type." user->id=".$user->id;
+
 		//print " - db ".$db->db;
 		print "\n";
 	}

+ 2 - 2
test/phpunit/phpunittest.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE phpunit SYSTEM "phpunit.dtd" >
 <phpunit
-	backupGlobals="true"
-	backupStaticAttributes="false"
+	backupGlobals="false"
+	backupStaticAttributes="true"
 	convertErrorsToExceptions="true"
 	convertNoticesToExceptions="true"
 	convertWarningsToExceptions="true"