Commit Graph

1886 Commits

Author SHA1 Message Date
Laurent Destailleur
7dd9a448cb Fix lang files and add phpunit test to avoid bad < 2024-02-20 22:53:59 +01:00
Laurent Destailleur
02e9ef8023 Close #28293 2024-02-20 14:58:46 +01:00
MDW
db9ce13849 Test/adminlib/remove deprecation (#28302)
* Fix: Deprecation message for backupGlobalsBlackList

# Fix: Deprecation message for backupGlobalsBlackList

Fix the deprecation messages during the tests:

1) AdminLibTest::testVersionCompare
PHPUnit\Framework\TestCase::$backupGlobalsBlacklist is deprecated and will be removed in PHPUnit 10. Please use PHPUnit\Framework\TestCase::$backupGlobalsExcludesList instead.

* Fix: Remove backupGlobalsBlacklist/backupGlobalsExcludesList

# Fix: Remove backupGlobalsBlacklist/backupGlobalsExcludesList

The  backupGlobalsBlacklist/backupGlobalsExcludesList does not seem required
and it is not documented why it is required, so remove this to simplify
the code (see https://github.com/Dolibarr/dolibarr/pull/28292#discussion_r1495116364 ).
2024-02-20 10:38:27 +01:00
MDW
272e8f79c9 Fix: Improve test configuration (#28294)
# Fix: Improve test configuration

## Do not fail early when running tests (stopOnFailure->false)

Finishing the phpunits tests does not require a lot of extra time
so rather than quiting early, run them all.

Also, when needed this option can be enabled on the CLI, but
it can not be disabled.  So when desired, it can still be added
in a ci-flow or local script.

## Improve reporting

We want to report Notices and Warnings and with enough detail to
help during debug.  These options are explicitly activated.
2024-02-20 01:26:25 +01:00
Laurent Destailleur
626edcac77 Add phpunit test on tasks 2024-02-20 01:17:00 +01: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
8abe663d6f Add phpunit to test the rename/move into a corrupted pdf file. 2024-02-17 18:59:57 +01:00
Laurent Destailleur
3d98b7b1ac Fix phpunit 2024-02-17 17:38:10 +01:00
Laurent Destailleur
750e3270ac Enhance apstats 2024-02-17 16:46:06 +01:00
Laurent Destailleur
c0a094974a Clean code 2024-02-17 16:03:24 +01:00
Laurent Destailleur
a3b876e5ca Clean code 2024-02-17 15:50:51 +01:00
Laurent Destailleur
eccff949d6 Mutualize code 2024-02-17 15:34:19 +01:00
Laurent Destailleur
671257e8e3 Clean phpunit tests 2024-02-17 15:19:06 +01:00
Laurent Destailleur
4bfbbff447 Remove teardownafter, setup and teardown method in phpunit test 2024-02-17 04:12:42 +01:00
Laurent Destailleur
f9f549ef26 Work on generic filter 2024-02-17 04:07:34 +01:00
Laurent Destailleur
56b0c29d1f Mutualise code 2024-02-16 23:26:32 +01:00
Laurent Destailleur
a32831bc6f Fix regression 2024-02-16 18:18:30 +01:00
Laurent Destailleur
6e8786241c Fix regression 2024-02-16 18:18:17 +01:00
MDW
399f5d6cbe Qual Improve messages in tests (#28193)
* Fix: Improve error messages for AdminLibTest

# Fix: Improve error messages for AdminLibTest

These changes clarify the messages when the changed assertions fail.

* Qual: Improve error messages for FileLibTest

# Qual: Improve error messages for FileLibTest

Certain tests now have error messages that help identify a failing test.
2024-02-16 02:28:32 +01:00
Laurent Destailleur
b48455c9d7 Can remove filter entries 2024-02-16 01:50:03 +01:00
Laurent Destailleur
7107b5feb3 Debug custom report filter management 2024-02-16 01:19:53 +01:00
MDW
43967a83a3 SEC: #28168 Correct protocol limitations (PHP7.4/Win) (#28172)
# SEC: #28168 Correct protocol limitations (PHP7.4/Win)

Protocol limitation was not active during test on windows platform.
Moving the application of the limitation just before the curl_exec
instruction made the limitation effective.

Also extended the code to enable allowing ftp and ftps and extended
the code for [CURLOPT_REDIR_PROTOCOLS_STR](https://www.php.net/manual/en/curl.constants.php#constant.curlopt-redir-protocols-str).
2024-02-15 15:20:21 +01:00
Laurent Destailleur
eedb7e4ec3 Fix warning 2024-02-13 14:05:29 +01:00
Laurent Destailleur
77e836c1b9 Fix remove a test that has no sense 2024-02-11 12:25:21 +01:00
Laurent Destailleur
9abdc1229a Fix test to execute workflow actions. Add more info in trigger errors. 2024-02-10 21:25:26 +01:00
MDW
2e254892ea Qual: Clean up codespell exceptions (#28104)
The files with exceptions can be updated as there are many less cases to
exclude.

In the project files there are a few minor spelling corrections, and
`$scrit` was changed to `$search_crit` to avoid a spelling suggestion.
2024-02-10 17:27:36 +01:00
Laurent Destailleur
1d6cbe1fda Fix GETPOST use should be avoid in classes 2024-02-02 23:46:12 +01:00
Laurent Destailleur
32e205b5d1 Clean code 2024-02-02 19:50:43 +01:00
thibdrev
bb2ca75c46 qual: Update FunctionsLibTest.php - add unit test for roundUpToNextMultiple()
see remarks from PR 27865
2024-01-30 17:49:58 +01:00
thibdrev
ec3687528e qual: Update ProfidLibTest.php - uncomment line testing that BE TIN shall start by 0 or 1
Since PR#27829 has been merged, we can now uncomment the line testing that a the Belgium Tax Identification Number shall start by 0 or 1.
2024-01-28 17:11:12 +01:00
thibdrev
e0b35d2f6b typo 2024-01-27 23:24:01 +01:00
thibdrev
4946184648 phpcs 2024-01-27 14:15:16 +01:00
thibdrev
1d0a6411bc qual: add phpunit tests for profid.lib.php 2024-01-27 14:09:04 +01:00
MDW
a04f2bf4e7 Qual: Spelling fixes that newly appeared. (#27495)
* Qual: Spelling fixes that newly appeared.

# Qual: Fix spelling erros that appeared since the bulk updates.

These issues mostly appeared since the bulk updates (a few ones were postponed
to make sure no real spelling errors were missed.)

* Update modulebuilder.lib.php

* Update pdf_standard.modules.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-01-14 12:26:37 +01:00
Laurent Destailleur
8f9d104ccd Fix phpunit 2024-01-13 19:37:06 +01:00
MDW
42a0d05b63 Qual: Spelling outside htdocs (#27448)
* Qual: Spelling outside htdocs

# Qual: Fix spelling of files not in the htdocs subdirectory.

Highlight:
- Change in email test from unvalid to invalid that should give the same test result.

* Update Dolibarr-soapui-project.xml

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-01-12 17:14:13 +01:00
Laurent Destailleur
c15627016a Fix bad test for disabling TCPDI. Add more phpunit 2024-01-10 21:51:32 +01:00
Alexandre Janniaux
a0a3339eb9 DiscountTest: fix create when no societe exists
Fix the following error when running without the dataset.

    ✘ Discount create
    ┐
    ├ ERROR:  23503: insert or update on table "llx_societe_remise_except" violates foreign key constraint "fk_soc_remise_fk_soc"                                                                                                                                                                                                                                                                                                                                      
    ├ DETAIL:  Key (fk_soc)=(1) is not present in table "llx_societe".                                                                                                                                                                                                                                                                                                                                                                                                 
    ├ SCHEMA NAME:  public                                                                                                                                                                                                                                                                                                                                                                                                                                             
    ├ TABLE NAME:  llx_societe_remise_except                                                                                                                                                                                                                                                                                                                                                                                                                           
    ├ CONSTRAINT NAME:  fk_soc_remise_fk_soc                                                                                                                                                                                                                                                                                                                                                                                                                           
    ├ LOCATION:  ri_ReportViolation, ri_triggers.c:2596 - sql=INSERT INTO llx_societe_remise_except (entity, datec, fk_soc, discount_type, fk_user, description, amount_ht, amount_tva, amount_ttc, tva_tx, vat_src_code, multicurrency_amount_ht, multicurrency_amount_tva, multicurrency_amount_ttc, fk_facture_source, fk_invoice_supplier_source) VALUES (1, '2024-01-05 14:05:20', 1, 0, 1, 'Specimen discount', 10, 1.96, 11.96, 19.6, '', 0, 0, 0,  null, null),
    ├ Failed asserting that 0 is less than -1.                                                                                                                                                                                                                                                                                                                                                                                                                         
    │
    │ dolibarr/test/phpunit/DiscountTest.php:147
    ┴
2024-01-05 15:05:33 +01:00
Laurent Destailleur
bbf687da0c Fix warning 2024-01-05 03:08:16 +01:00
Laurent Destailleur
02183b473d Merge pull request #27294 from alexandre-janniaux/fichintertest-soc/1
FIX: FichinterTest: create Societe object in test
2024-01-05 02:05:17 +01:00
Alexandre Janniaux
0e58316050 FichinterTest: create Societe object
Fix the following error when running without the dataset.

    Fichinter
     ✘ Fichinter create
       ┐
       ├ ERROR:  23503: insert or update on table "llx_fichinter" violates foreign key constraint "fk_fichinter_fk_soc"
       ├ DETAIL:  Key (fk_soc)=(1) is not present in table "llx_societe".
       ├ SCHEMA NAME:  public
       ├ TABLE NAME:  llx_fichinter
       ├ CONSTRAINT NAME:  fk_fichinter_fk_soc
       ├ LOCATION:  ri_ReportViolation, ri_triggers.c:2596,
       ├ Failed asserting that 0 is less than -1.
       │
       │ dolibarr/test/phpunit/FichinterTest.php:147
       ┴
2024-01-04 17:04:45 +01:00
Alexandre Janniaux
a07ad0fe73 FichinterTest: add errorsToString()
Adding $localobject->errorsToString() as third argument to the assert
will allow to forward internal errors towards the tests and display them
accordingly.
2024-01-04 17:02:12 +01:00
Laurent Destailleur
482adfd7a0 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into develop 2023-12-30 13:11:15 +01:00
Laurent Destailleur
a04b714d28 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2023-12-30 13:10:42 +01:00
Laurent Destailleur
14cc6c0332 Fix phpunit 2023-12-30 13:09:41 +01:00
Laurent Destailleur
ef312e960c Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into develop 2023-12-29 16:53:09 +01:00
Laurent Destailleur
d2b3920684 Merge 2023-12-29 16:51:05 +01:00
MDW
b5b8a2a874 Fix utf8_encoding/decoding (PHP8.2 deprecation)
Fix files that were missed in #27018
2023-12-27 19:45:37 +01:00
Laurent Destailleur
61c5c6f88d Fix regression 2023-12-27 13:09:25 +01:00
Laurent Destailleur
6386b02963 Fix phpunit for postgresql 2023-12-19 15:10:59 +01:00