2
0
forked from Wavyzz/dolibarr
Commit Graph

125 Commits

Author SHA1 Message Date
Laurent Destailleur
de7d3c2bf8 Fix with php-cs-fixer 2023-12-04 11:22:28 +01:00
Alexandre Janniaux
9fe9eee18a FIX|Fix some minor issues on Reception and add a new test for it (#26310)
* reception: reOpen: mirror $this->statut in $this->status

$this->statut is the deprecated variable, $this->status should also get
the correct value.

* reception: setDraft: mirror $this->statut in $this->status

$this->statut is the deprecated variable, $this->status should also get
the correct value.

* reception: add missing $weight field

Fix warning:

    Undefined property: Reception::$weight

* societe: add country_id field

* reception: use getDolGlobalInt when suitable

Using empty() implies that the value actually exists on the stdClass at
$conf->global, but it's not always the case. getDolGlobalInt will handle
this smoothly by checking first, which solves warnings like those:

    Undefined property: stdClass::$STOCK_CALCULATE_ON_RECEPTION

* ReceptionTest: add new test

The test checks the usual workflow of the Reception class, with, on the
one hand, the common CRUD operations:
 - create
 - fetch
 - update
 - delete

And on the other hand, the status handling for Reception:
 - valid: STATUS_DRAFT -> STATUS_VALID
 - setClosed: STATUS_VALID -> STATUS_CLOSED
 - reOpen: STATUS_CLOSED -> STATUS_VALID
 - setDraft: STATUS_VALID -> STATUS_DRAFT

The stocks lines are not tested yet, and the error cases, like any other
transition not described above, are not tested either. The permissions
for some of the operations are hardcoded for the test and there is no
failure check when the permission is not set yet.
2023-10-21 16:28:30 +02:00
Laurent Destailleur
b21a24aa97 Add AssetModel in AllTest 2023-09-26 20:52:49 +02:00
Laurent Destailleur
fb5f4c1dc2 NEW Add phpunit for REST API of contacts 2023-09-08 21:12:59 +02:00
Laurent Destailleur
833c798bf5 Test CI 2023-06-19 20:23:09 +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
Laurent Destailleur
b55271dedb Fix warning 2023-04-15 03:27:35 +02:00
Laurent Destailleur
9ffc86a872 Remove warning 8.2 2023-04-11 18:49:15 +02:00
Laurent Destailleur
a67351ac43 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into develop 2023-03-28 20:24:40 +02:00
Laurent Destailleur
25d57b1227 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2023-03-28 17:15:36 +02:00
Frédéric FRANCE
2c75dd8026 Update AllTests.php 2023-03-28 12:43:45 +02:00
Laurent Destailleur
ec7627572f Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into develop 2023-03-27 18:32:25 +02:00
Laurent Destailleur
5ba48f9746 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2023-03-27 18:08:51 +02:00
Laurent Destailleur
e0cd351b3e Fix sanitize website module 2023-03-27 17:37:09 +02:00
Laurent Destailleur
a618bed16d Add phpunit for DDLUpdateField 2023-03-22 15:22:23 +01:00
Frédéric FRANCE
140a3b462d add ajax tooltip on usergroup 2023-02-03 09:29:02 +01:00
Laurent Destailleur
685a7dbd59 Clean code. Add a phpunit test to avoid duplicate jquery. 2022-12-24 15:06:32 +01:00
Frédéric France
8e66b7207e replace ! empty by !empty 2022-08-31 22:14:20 +02:00
Laurent Destailleur
42c24de2ae Fix bad test 2021-06-22 15:53:14 +02:00
Laurent Destailleur
6b93f58de6 Fix bad test 2021-06-22 15:46:51 +02:00
Laurent Destailleur
83d30be106 Fix Add missing phpunits 2021-06-22 14:40:48 +02:00
Laurent Destailleur
a0b594fbdc Debug emailcollector 2021-06-21 19:47:43 +02:00
Frédéric FRANCE
b1a1cd4be6 code syntax 2021-01-14 15:09:08 +01:00
Laurent Destailleur
834058a816 Debug api to create a document 2020-12-16 02:33:21 +01:00
Laurent Destailleur
4f826fae26 Fix warnings 2020-12-07 12:18:53 +01:00
Laurent Destailleur
030df716a2 Clean dead code: Function showStripePaymentUrl, getStripePaymentUrl,
showPaypalPaymentUrl and getPaypalPaymentUrl has been removed. The
generic one showOnlinePaymentUrl and getOnlinePaymentUrl are always
used.
2020-12-07 11:01:08 +01:00
Laurent Destailleur
4119174ef1 Include sql injection tests into PHPUnit 2020-11-27 16:52:52 +01:00
Laurent Destailleur
b6640da281 Fix javascript obfuscating with HTML comments 2020-11-26 23:37:35 +01:00
Laurent Destailleur
b93213e9a3 Add more phpunit 2019-10-09 13:25:32 +02:00
Alexandre SPANGARO
02dbc11f98 Move Gnu.org to https 2019-09-23 21:55:30 +02:00
Laurent Destailleur
bb81f66a1a Add phpunit test for Lessc 2019-09-06 10:36:49 +02:00
Laurent Destailleur
31e99414b5 Prepare for php 8 2019-08-27 12:34:46 +02:00
Laurent Destailleur
669301669d Add phpunit for FormTest 2019-08-26 22:48:45 +02:00
Regis Houssin
569d59d251 FIX change my deprecated email 2018-10-27 14:43:12 +02:00
Laurent Destailleur
5bd538fb2c Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	ChangeLog
	htdocs/core/modules/modStripe.class.php
	htdocs/filefunc.inc.php
	htdocs/projet/element.php
2018-09-20 23:43:34 +02:00
Laurent Destailleur
37dcb33661 phpunit for Loan 2018-09-20 23:41:04 +02:00
Laurent Destailleur
c55ebecff7 Include PHP unit of Loan class into Travis 2018-09-20 19:06:12 +02:00
Frédéric FRANCE
6aee680a4f PSR2 ClassDeclaration 2018-08-29 22:06:05 +02:00
Laurent Destailleur
549d4609d2 Fix phpunit 2018-06-13 19:57:25 +02:00
Laurent Destailleur
3e0becb432 Fix phpunit 2018-06-13 19:29:23 +02:00
Laurent Destailleur
202d37bc24 Add PHPunit tests for action comm 2018-06-07 13:07:15 +02:00
Laurent Destailleur
87d073b5cd Fix conflict with external ticketsup module 2018-06-04 21:49:29 +02:00
Laurent Destailleur
de84f0e687 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/compta/facture/class/facture.class.php
	htdocs/core/actions_massactions.inc.php
	htdocs/filefunc.inc.php
2018-05-21 23:35:09 +02:00
Laurent Destailleur
79bbeb05ae Add missing phpunit tests 2018-05-18 11:17:33 +02:00
Laurent Destailleur
97c93e35fc Add phpunit for ticket 2018-03-12 12:57:39 +01:00
Laurent Destailleur
e1f0483b23 Fix grabber of url when url is on second level dir. More phpunits 2017-12-10 17:59:19 +01:00
Laurent Destailleur
2caeafc03b NEW Compatibility with PHP 7.2 2017-11-17 18:32:37 +01:00
Laurent Destailleur
0b349bef60 Test php 7.2 2017-11-17 17:15:23 +01:00
Laurent Destailleur
e7121cda81 Disable some test with php 7.2 2017-11-17 17:11:35 +01:00
Laurent Destailleur
d90e3e88c2 NEW Add method executeCLI and a phpunit 2017-11-06 20:24:12 +01:00