32 Commits

Author SHA1 Message Date
Frédéric FRANCE
9067c6deec replace deprecated (#31803)
* replace deprecated

* replace deprecated
2024-11-14 00:16:43 +01:00
MDW
31584659e0 Refactor objCompare
# Refactor objCompare:

- Move to CommonClassTest;
- Report class name for mismatched property;
- Cope with dolDeprecated property aliases (test may exclude deprecated name,
  also exclude new name).
2024-04-02 11:25:17 +02:00
MDW
afe17928f2 Qual: Improve test messages to help locate errors + php-cs-fixer on tests (#28272)
* Qual: Apply php-cs-fixer before changes

# Qual: Apply php-cs-fixer before changes

Apply php-cs-fixer before changes to make real changes stand out
in next commit.

* Qual: Improve test messages to help locate errors.

# Qual: Improve test messages to help locate errors.

Included a description of the test in the failing assertions to
help locate the error.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: Update spelling exception

# Qual: Update spelling exception

Formatting the code requires an update in the spelling exception list.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.

* Qual: php-cs-fixer on phpunit test file

# Qual: php-cs-fixer on phpunit test file

Apply php-cs-fixer on phpunit test files so that future manual changes
stand out.
2024-02-19 15:28:21 +01:00
Laurent Destailleur
eccff949d6 Mutualize code 2024-02-17 15:34:19 +01:00
Laurent Destailleur
56b0c29d1f Mutualise code 2024-02-16 23:26:32 +01:00
Laurent Destailleur
de7d3c2bf8 Fix with php-cs-fixer 2023-12-04 11:22:28 +01:00
Laurent Destailleur
1aa535e994 Fix regressions 2023-08-06 01:41:53 +02:00
Laurent Destailleur
5dae5b57a0 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2023-05-17 12:27:46 +02:00
Alexandre Janniaux
df0adc391d FIX test/phpunit: add $name to __construct()
Fix the following errors when running recent phpunit:

    Message:  Too few arguments to function PHPUnit\Framework\TestCase::__construct(), 0 passed in
    dolibarr/test/phpunit/DateLibTzFranceTest.php on line 63 and exactly
    1 expected Location: phar:///usr/share/webapps/bin/phpunit.phar/phpunit/Framework/TestCase.php:265

Indeed, the old constructor had an optional $name='' parameter but the
new constructor reads like this:

    public function __construct(string $name)

and the parameter is now mandatory.
2023-05-08 16:29:31 +02:00
Alexandre Janniaux
b6235c29d0 phpunit: use $db instead of $this->savdb
The global variables are stored in $this, and in particular $db is used
through this mean. But $this->savdb is supposed to be the immutable
global state that is stored at the test class instantiation and restored
at the beginning of each test.

For $this->savdb, I don't think any consequences are created by this,
since the object is saved by each test anyway and the $db object is
mostly a query object within a transaction, but future change could use
this to inject a different stateful $db object to trace some behaviour
in the test for instance, so make sure the correct one is used.
2023-04-26 16:44:07 +02:00
Laurent Destailleur
6c17c2f044 Test travis php7.1 2022-09-21 17:55:04 +02:00
Laurent Destailleur
0a0bb92689 Fix phpcs 2021-03-06 11:37:23 +01:00
Laurent Destailleur
3cbced439a Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/admin/tools/listevents.php
	htdocs/compta/bank/line.php
	htdocs/compta/facture/class/facture-rec.class.php
	htdocs/compta/facture/class/facture.class.php
	htdocs/compta/paiement/cheque/card.php
	htdocs/core/class/commonobject.class.php
	htdocs/core/class/extrafields.class.php
	htdocs/core/lib/date.lib.php
	htdocs/core/lib/ticket.lib.php
	htdocs/core/modules/mailings/modules_mailings.php
	htdocs/core/tpl/extrafields_view.tpl.php
	htdocs/core/tpl/objectline_view.tpl.php
	htdocs/cron/list.php
	htdocs/expedition/card.php
	htdocs/mrp/mo_list.php
	htdocs/product/stock/productlot_card.php
	htdocs/public/emailing/mailing-read.php
	htdocs/public/emailing/mailing-unsubscribe.php
	htdocs/ticket/list.php
	test/phpunit/FactureRecTest.php
2021-03-05 19:29:09 +01:00
Laurent Destailleur
6503c81f47 FIX #16530 2021-03-03 23:55:28 +01:00
Frédéric FRANCE
ae192bf4c9 doxygen 2021-02-10 08:47:22 +01:00
Frédéric FRANCE
b1a1cd4be6 code syntax 2021-01-14 15:09:08 +01:00
Laurent Destailleur
100edffdaf Fix phpunit 2020-11-08 16:04:54 +01:00
Frédéric FRANCE
674b0e38c8 add new rule 2020-05-21 15:13:31 +02:00
Frédéric FRANCE
43dcd9beb5 add new rule 2020-05-21 00:02:33 +02:00
Laurent Destailleur
4d6a45d491 Major doxygen fix 2020-05-03 22:48:35 +02:00
Alexandre SPANGARO
02dbc11f98 Move Gnu.org to https 2019-09-23 21:55:30 +02:00
Laurent Destailleur
3af4ad7fc3 Compatibility with phpunit v6 2019-07-05 21:28:27 +02:00
Frédéric FRANCE
42a1387218 wip 2019-02-25 00:56:48 +01:00
Frédéric FRANCE
b10558bacd Merge remote-tracking branch 'upstream/develop' into nospaceaftercomma 2019-01-27 23:23:38 +01:00
Frédéric FRANCE
f0cdf300d1 Squiz.Functions.FunctionDeclarationArgumentSpacing 2019-01-27 15:20:16 +01:00
Frédéric FRANCE
24b073771e wip 2019-01-27 13:07:22 +01:00
Laurent Destailleur
a69c3caf2c Prepare compatibility with phpunit 6.1 2018-09-02 14:10:06 +02:00
frederic34
73fda2cb86 WIP PSR2 2015-01-08 18:36:03 +01:00
Laurent Destailleur
5fdd798e91 Fix: phpcheckstyle from phpcs 1.5.5 (closing tags and & char on
parameter).
2014-09-27 17:13:15 +02:00
Laurent Destailleur
e8b7c9c6bd Fix: doxygen 2014-09-27 16:00:11 +02:00
Laurent Destailleur
19fb5e5085 Try to fix phpunit error with new version. 2014-05-01 19:57:53 +02:00
Laurent Destailleur
a1e7333613 Fix: bug preventing creation of predefined invoice.
Also added phpunit test to detect it if it occurs again.
2013-09-16 13:42:42 +02:00