2
0
forked from Wavyzz/dolibarr
Commit Graph

1668 Commits

Author SHA1 Message Date
Lucas Marcouiller
d63687da6d Fix dol_escape_htmltag to prevent bad strip of char (#29931)
Co-authored-by: Hystepik <lmarcouiller@nltechno.com>
2024-06-08 14:51:32 +02:00
Laurent Destailleur
5bbc4e083e Add a phpunit test 2024-06-04 14:06:35 +02:00
Laurent Destailleur
580a021c7d Fix warnings 2024-06-01 15:30:43 +02:00
Laurent Destailleur
ad48477f6c Fix name of test file 2024-06-01 12:21:54 +02:00
Laurent Destailleur
ba6e7e85db Merge #28264 to get a simpler code 2024-06-01 12:02:23 +02:00
Laurent Destailleur
3cd74f4689 Fix phpunit 2024-05-29 14:43:23 +02:00
Laurent Destailleur
4d49d01eec Fix phpunit 2024-05-15 12:19:57 +02:00
Laurent Destailleur
1b2bad3f42 NEW Add function to manipulate emojis 2024-05-14 18:19:48 +02:00
Laurent Destailleur
7f3ed10922 Add phpunit case 2024-05-14 04:08:54 +02:00
Laurent Destailleur
27bc1cddad Debug v20 2024-05-08 15:43:46 +02:00
Laurent Destailleur
f8d072f04c Fix phpunit 2024-04-23 20:26:24 +02: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
Laurent Destailleur
fbf0912a98 Fix phpunit warnings 2024-03-28 21:33:09 +01:00
Laurent Destailleur
0544670ac4 Merge pull request #28160 from mdeweerd/core/deprecationclass
NEW: DolDeprecationHandler for deprecations
2024-03-28 12:42:53 +01:00
MDW
c87c3b100c Qual: LangTest: Use dataprovider, beautify output 2024-03-27 22:12:27 +01:00
Laurent Destailleur
4efa503400 NEW Accept the __NOW__ and __USER_ID__key into filters 2024-03-25 23:53:28 +01:00
MDW
a6d4a99cca NEW: DolDeprecationHandler for deprecations
# NEW: DolDeprecationHandler for deprecations

This reusable class avoids needed to implement double assignments while enabling
the detection of the use of deprecated variables and methods.

There is no efficiency overhead when the proper variables and methods are
used.
2024-03-24 17:39:02 +01:00
Laurent Destailleur
295587ea20 Fix warning 2024-03-24 14:19:44 +01:00
Laurent Destailleur
220b9d0852 Add a unit test on dol_eval 2024-03-24 07:08:40 +01:00
Laurent Destailleur
3fdf5e2881 Fix phpunit for Expedition 2024-03-24 06:31:59 +01:00
Laurent Destailleur
954b127ee0 Fix phpunit 2024-03-24 06:30:18 +01:00
Laurent Destailleur
072c3070b3 Add phpunit for Expedition 2024-03-24 06:23:56 +01:00
Laurent Destailleur
d9488770ae GETPOST(..., 'alpha') does not accept \ char anymore. Replaced with / 2024-03-24 01:45:31 +01:00
Laurent Destailleur
7cbff76f9d Fix phpunit 2024-03-21 14:48:03 +01:00
Laurent Destailleur
2d0e57ce7c Fix test for pgsql 2024-03-21 14:13:17 +01:00
Laurent Destailleur
aa77573cd9 Sanitize DDL instructions 2024-03-21 12:45:58 +01:00
Laurent Destailleur
171c32be34 Add DDLDropTable and DDLCreateTable into phpunit tests 2024-03-21 12:21:38 +01:00
Laurent Destailleur
ae10eedf2a Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-03-21 11:29:16 +01:00
Laurent Destailleur
57eb393dad Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-03-21 11:22:28 +01:00
Andrés Maldonado
976686262d FIX: SQL syntax error in DDLUpdateField 2024-03-21 02:36:40 +01:00
MDW
a094ad38fc Fix spelling (using beta codespell)
# Fix spelling (using beta codespell

New spelling fixes - ignoring thirdparty which should be either third-party
or third party.
2024-03-20 00:35:01 +01:00
MDW
f2b7179392 Add test case for numero_semaine 2024-03-18 04:03:50 +01:00
MDW
e5cf5475a1 Qual: Improve test message on failure 2024-03-15 14:20:59 +01:00
MDW
d8a785fa2b FIX get_string_between
# FIX get_string_between

Noticed that the typing of the arguments was incorrect and then found
the implementation suspicious.  The implemented test confirmed that it
was flawed.  Fixed.

Apparently this method is used in get_next_value .
2024-03-13 02:58:59 +01:00
Laurent Destailleur
a6926c29c0 Merge pull request #28778 from fappels/develop_fix_delivery_note
Fix shipping is not a delivery_note (is sub module of shipping)
2024-03-12 14:53:51 +01:00
Francis Appels
75e99a6dee Fix phan tool for shipping 2024-03-12 11:21:42 +01:00
MDW
325cb587f6 Qual: Exclude some tests from windows-ci until fixed
# Qual: Exclude some tests from windows-ci until fixed

Until #28598 and #28264 find some way to the develop branch, this update will
skip the tests that currently fail on windows so that the results of other
tests have an effect on the CI status and github annotations
2024-03-11 20:46:21 +01:00
Laurent Destailleur
1aa1647606 Update SecurityTest.php 2024-03-11 12:53:03 +01:00
Laurent Destailleur
41a57c05c5 Update SecurityTest.php 2024-03-11 12:51:27 +01:00
Laurent Destailleur
29216f3d4e Update CommonClassTest.class.php 2024-03-11 12:49:15 +01:00
Laurent Destailleur
ff0d147847 Merge branch 'develop' into test/security_dol_eval_ob_cleanup_on_exception 2024-03-11 12:48:31 +01:00
Laurent Destailleur
1f4e7aedde Avoid to denaturate value when not required. 2024-03-11 12:47:53 +01:00
MDW
101d56a2c1 Fix: Ob buffer cleanup on exception
# Fix: Ob buffer cleanup on exception

The OB buffer capture was incorrectly cleaned up on exception.
This fixes that.

Also modified the SecurityTest to enable running it standalone
2024-03-10 15:17:58 +01:00
MDW
746ca01423 Fix: Correctly close active output buffer. (#28723)
# Fix: Correctly close active output buffer.

Use ob_get_clean(), not ob_get_contents() and ob_clean().

Tests were failing with:
FunctionsLibTest::testVerifCond with data set "Test that verifConf("0") returns false" ('0', false)
Test code or tested code did not (only) close its own output buffers

OK, but incomplete, skipped, or risky tests\!

Also refactored a test case to use a data provider which helped identify that it was related
to dol_eval.
2024-03-09 01:27:01 +01:00
Laurent Destailleur
f0693549b3 Fix bad message 2024-03-05 01:12:28 +01:00
Laurent Destailleur
41c8c23dbb Disable not complete test 2024-03-05 01:07:19 +01:00
Laurent Destailleur
31ae1bf97f Fix restore stop on failure. No need to continue, we must fix first.
Make travis error analysis easier too.
2024-03-05 01:05:50 +01:00
Laurent Destailleur
d09c9c0174 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-03-05 00:23:38 +01:00
Laurent Destailleur
ce010a54c7 Clean code and prepare a more powerfull phpunit check for sql forging. 2024-03-05 00:22:12 +01:00
MDW
6f8b941c96 Fix: Script tests on Windows where PHP executable is not in path. (#28565)
# Fix: Script tests (on Windows)

- Set `exit(255)` instead of `exit(-1)` in `scripts/bank/export-bank-receipts.php`.
  On *nix, the -1 converts into an exist code of 255 but on windows it
  is -1, making the test fail.
- Add a helper method to execute php scripts using the php binary used
  to run phpunit.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-03-04 20:13:34 +01:00