Skip to content

Commit

Permalink
Merge branch '7.0' of [email protected]:Dolibarr/dolibarr.git into 8.0
Browse files Browse the repository at this point in the history
Conflicts:
	.travis.yml
  • Loading branch information
eldy committed Sep 2, 2018
2 parents df26ae7 + f216da7 commit 76d6aff
Show file tree
Hide file tree
Showing 71 changed files with 203 additions and 65 deletions.
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,17 @@ env:
matrix:
fast_finish: true
allow_failures:
- php: hhvm
- php: nightly
# We exclude some combinations not usefull to save Travis CPU
exclude:
- php: '5.5'
env: DB=mysql
env: DB=mariadb
- php: '5.6'
env: DB=mysql
env: DB=mariadb
- php: '7.0'
env: DB=mysql
env: DB=mariadb
- php: '7.1'
env: DB=mysql
env: DB=mariadb
- php: '5.5'
env: DB=postgresql
- php: '5.6'
Expand Down
3 changes: 2 additions & 1 deletion htdocs/core/class/html.form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1110,8 +1110,9 @@ function select_thirdparty_list($selected='',$htmlname='socid',$filter='',$showe
if (count($scrit) > 1) $sql.=")";
if (! empty($conf->barcode->enabled))
{
$sql .= " OR s.barcode LIKE '".$this->db->escape($filterkey)."%'";
$sql .= " OR s.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'";
}
$sql.= " OR s.code_client LIKE '".$this->db->escape($prefix.$filterkey)."%' OR s.code_fournisseur LIKE '".$this->db->escape($prefix.$filterkey)."%'";
$sql.=")";
}
$sql.=$this->db->order("nom","ASC");
Expand Down
2 changes: 2 additions & 0 deletions test/phpunit/AccountingAccountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class AccountingAccountTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
Expand Down
4 changes: 3 additions & 1 deletion test/phpunit/ActionCommTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ class ActionCommTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
//$this->sharedFixture
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
$this->savuser=$user;
Expand Down
4 changes: 3 additions & 1 deletion test/phpunit/AdherentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ class AdherentTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
//$this->sharedFixture
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
$this->savuser=$user;
Expand Down
4 changes: 3 additions & 1 deletion test/phpunit/AdminLibTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ class AdminLibTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
//$this->sharedFixture
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
$this->savuser=$user;
Expand Down
4 changes: 3 additions & 1 deletion test/phpunit/BankAccountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ class BankAccountTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
//$this->sharedFixture
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
$this->savuser=$user;
Expand Down
2 changes: 2 additions & 0 deletions test/phpunit/BonPrelevementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ class BonPrelevementTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
Expand Down
4 changes: 3 additions & 1 deletion test/phpunit/BuildDocTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ class BuildDocTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
//$this->sharedFixture
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
$this->savuser=$user;
Expand Down
6 changes: 4 additions & 2 deletions test/phpunit/CMailFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ class CMailFileTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
//$this->sharedFixture
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
$this->savuser=$user;
Expand Down Expand Up @@ -103,7 +105,7 @@ protected function setUp()
$db=$this->savdb;

$conf->global->MAIN_DISABLE_ALL_MAILS=1; // If I comment/remove this lien, unit test still works alone but failed when ran from AllTest. Don't know why.

print __METHOD__."\n";
}
/**
Expand Down
4 changes: 3 additions & 1 deletion test/phpunit/CategorieTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ class CategorieTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
//$this->sharedFixture
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
$this->savuser=$user;
Expand Down
20 changes: 11 additions & 9 deletions test/phpunit/ChargeSocialesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class ChargeSocialesTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
Expand Down Expand Up @@ -117,7 +119,7 @@ protected function tearDown()

/**
* testChargeSocialesCreate
*
*
* @return void
*/
public function testChargeSocialesCreate()
Expand All @@ -139,10 +141,10 @@ public function testChargeSocialesCreate()

/**
* testChargeSocialesFetch
*
*
* @param int $id Id of social contribution
* @return void
*
*
* @depends testChargeSocialesCreate
* The depends says test is run only if previous is ok
*/
Expand All @@ -164,10 +166,10 @@ public function testChargeSocialesFetch($id)

/**
* testChargeSocialesValid
*
*
* @param Object $localobject Social contribution
* @return void
*
*
* @depends testChargeSocialesFetch
* The depends says test is run only if previous is ok
*/
Expand All @@ -188,10 +190,10 @@ public function testChargeSocialesValid($localobject)

/**
* testChargeSocialesOther
*
*
* @param Object $localobject Social contribution
* @return void
*
*
* @depends testChargeSocialesValid
* The depends says test is run only if previous is ok
*/
Expand All @@ -216,10 +218,10 @@ public function testChargeSocialesOther($localobject)

/**
* testChargeSocialesDelete
*
*
* @param int $id Social contribution
* @return void
*
*
* @depends testChargeSocialesOther
* The depends says test is run only if previous is ok
*/
Expand Down
4 changes: 3 additions & 1 deletion test/phpunit/CodingPhpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ class CodingPhpTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
//$this->sharedFixture
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
$this->savuser=$user;
Expand Down
4 changes: 3 additions & 1 deletion test/phpunit/CodingSqlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ class CodingSqlTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
//$this->sharedFixture
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
$this->savuser=$user;
Expand Down
4 changes: 3 additions & 1 deletion test/phpunit/CommandeFournisseurTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
//$this->sharedFixture
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
$this->savuser=$user;
Expand Down
4 changes: 3 additions & 1 deletion test/phpunit/CommandeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ class CommandeTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
//$this->sharedFixture
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
$this->savuser=$user;
Expand Down
4 changes: 3 additions & 1 deletion test/phpunit/CommonObjectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ class CommonObjectTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
//$this->sharedFixture
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
$this->savuser=$user;
Expand Down
2 changes: 2 additions & 0 deletions test/phpunit/CompanyBankAccountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
Expand Down
4 changes: 3 additions & 1 deletion test/phpunit/CompanyLibTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ class CompanyLibTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
//$this->sharedFixture
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
$this->savuser=$user;
Expand Down
4 changes: 3 additions & 1 deletion test/phpunit/ContactTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ class ContactTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
Expand Down Expand Up @@ -207,7 +209,7 @@ public function testContactUpdate($localobject)
$localobject->email='[email protected]';
$localobject->jabberid='New im id';
$localobject->default_lang='es_ES';

$result=$localobject->update($localobject->id,$user);
print __METHOD__." id=".$localobject->id." result=".$result."\n";
$this->assertLessThan($result, 0, 'Contact::update error');
Expand Down
2 changes: 2 additions & 0 deletions test/phpunit/ContratTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class ContratTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
Expand Down
4 changes: 3 additions & 1 deletion test/phpunit/CoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ class CoreTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
//$this->sharedFixture
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
$this->savuser=$user;
Expand Down
2 changes: 2 additions & 0 deletions test/phpunit/DateLibTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class DateLibTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
Expand Down
2 changes: 2 additions & 0 deletions test/phpunit/DateLibTzFranceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class DateLibTzFranceTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
Expand Down
2 changes: 2 additions & 0 deletions test/phpunit/DiscountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class DiscountTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
Expand Down
2 changes: 2 additions & 0 deletions test/phpunit/EntrepotTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class EntrepotTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
Expand Down
6 changes: 4 additions & 2 deletions test/phpunit/ExpenseReportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ class ExpenseReportTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
//$this->sharedFixture
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
$this->savuser=$user;
Expand Down Expand Up @@ -151,7 +153,7 @@ public function testExpenseReportCreate()
$localobject2->initAsSpecimen(); // Init a speciment with lines
$localobject2->status = 0;
$localobject2->fk_statut = 0;

$result=$localobject2->create($user);
print __METHOD__." result=".$result."\n";
$this->assertGreaterThanOrEqual(0, $result);
Expand Down
2 changes: 2 additions & 0 deletions test/phpunit/ExportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class ExportTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
Expand Down
2 changes: 2 additions & 0 deletions test/phpunit/FactureFournisseurTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ class FactureFournisseurTest extends PHPUnit_Framework_TestCase
*/
function __construct()
{
parent::__construct();

//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
Expand Down
Loading

0 comments on commit 76d6aff

Please sign in to comment.