dolibarr/test/phpunit
Frédéric FRANCE c8aa61198b
NEW Add PHPUnit test for getElementProperties() (#39550)
getElementProperties() is the central registry used across the
codebase (fetchObjectByElement(), generic links/extrafields, document
generation...) to resolve an element type string into its module,
classpath, classfile, classname, table and parent element, but it had
no test coverage despite being a ~480 line function with about 60
special-case branches plus several generic fallback paths.

Covers the representative paths rather than every branch:
- the generic completion of classfile/classname from subelement
  (project)
- the 'myobject@mymodule' external-module syntax, including the
  surprising fact that table_element keeps the raw '@'-string
- the 'myobject_mysubobject' syntax combined with a dedicated case
  branch overriding module (project_task)
- the generic '...det' object-line fallback for an unknown module,
  including the non-capitalized classname it produces (myobjectdet)
- a real '...det' case where the generic fallback runs first and a
  dedicated branch only adds parent_element on top (contratdet)
- a real '...det' case where the dedicated branch instead overrides
  classpath and classname set by the generic fallback (facturedet)
- the action/actioncomm special case, where table_element differs
  from the raw input element
2026-08-17 04:44:13 +02:00
..
functional Qual: Improve test messages to help locate errors + php-cs-fixer on tests (#28272) 2024-02-19 15:28:21 +01:00
.gitignore Ignore file to avoid commiting it 2025-10-18 11:56:07 +02:00
AbstractRestAPITest.php Debug v24 2026-06-21 15:20:14 +02:00
AccountancySystemTest.php test: phpunit: add AccountancySystemTest 2024-12-04 08:10:37 +01:00
AccountingAccountTest.php exit code must be >= 0 (#35311) 2025-09-12 02:29:23 +02:00
ActionCommTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
AdherentTest.php CI 2026-05-22 12:17:17 +02:00
AdminLibTest.php Fix comparison on version to show the warning to upgrade database 2025-08-20 16:02:46 +02:00
AllTests.php NEW: Add phpunit test for Cronjob class (#39541) 2026-08-15 18:22:45 +02:00
AssetModelTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
BankAccountTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
BarcodeTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
BlockedLogAndLNETest.php More robust phpunit 2026-01-29 11:25:33 +01:00
BOMTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
BonPrelevementTest.php FIX bon prelevement SEPA generation (#38998) 2026-07-04 13:27:58 +02:00
BonVirementTest.php FIX bon prelevement SEPA generation (#38998) 2026-07-04 13:27:58 +02:00
BookKeepingTest.php tests: add BookKeeping test (#34062) 2025-05-05 21:31:48 +02:00
BuildDocTest.php Fix CI 2026-03-02 15:15:44 +01:00
CategorieTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
CDavLibTest.php Revert "/imports/index.php wrongly shows access refused (#39379)" (#39386) 2026-08-04 22:23:57 +02:00
ChargeSocialesTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
CMailFileTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
CodingPhpTest.php Qual: Fix 'SqlInjection' notices (#39216) 2026-07-23 19:06:39 +02:00
CodingSqlTest.php Fix CI 2026-02-21 12:22:59 +01:00
CommandeFournisseurTest.php Clean code 2025-10-17 23:43:28 +02:00
CommandeTest.php add phpcs rule extension (#36561) 2026-01-15 16:05:06 +01:00
CommentTest.php NEW: Add phpunit test for Comment class (#39540) 2026-08-15 16:03:53 +02:00
CommonClassTest.class.php Revert "/imports/index.php wrongly shows access refused (#39379)" (#39386) 2026-08-04 22:23:57 +02:00
CommonInvoiceTest.php Fix CI 2026-01-08 13:06:30 +01:00
CommonObjectTest.php FIX isInt() does not detect sized integer types (tinyint, bigint) (#39236) 2026-07-20 15:30:28 +02:00
CompanyBankAccountTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
CompanyLibTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
ContactTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
ContratTest.php Fix contract update method. Add phpunit for TDD. 2025-03-07 16:02:18 +01:00
CoreTest.php Qual: Improve test messages to help locate errors + php-cs-fixer on tests (#28272) 2024-02-19 15:28:21 +01:00
CronjobTest.php NEW: Add phpunit test for Cronjob class (#39541) 2026-08-15 18:22:45 +02:00
DateLibTest.php Automated merge from 22.0 to 23.0 by tool pullmerge.sh 2026-07-19 15:41:05 +02:00
DateLibTzFranceTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
DAVLibTest.php Revert "/imports/index.php wrongly shows access refused (#39379)" (#39386) 2026-08-04 22:23:57 +02:00
DiscountTest.php Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop 2026-07-16 00:00:17 +02:00
DolDeprecationHandlerTest.php Update DolDeprecationHandlerTest 2025-02-19 15:53:56 +01:00
DoliDBTest.php Try to fix CI for pgsql 2025-12-22 03:45:20 +01:00
DolresourceTest.php NEW: Add phpunit test for Dolresource class (#39520) 2026-08-14 20:31:06 +02:00
EmailCollectorTest.php Fix #39005 keep UTF-8 body extraction values (#39011) 2026-06-29 20:24:02 +02:00
EntrepotTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
EvalMathTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
ExampleTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
ExpeditionTest.php fix parameters (#35209) 2025-09-03 22:33:25 +02:00
ExpenseReportTest.php FIX Missing comma in ExpenseReportLine::fetch SQL (#38767) 2026-06-14 01:12:13 +02:00
ExportTest.php QUAL Move function csvClean into functions2.lib.php 2024-10-03 21:36:39 +02:00
ExtraFieldsTest.php FIX #30801 Filter a dependent select list of extrafields when the field is edited alone (#39488) 2026-08-15 03:04:31 +02:00
FactureFournisseurTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
FactureRecTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
FactureTest.php More robust phpunit 2026-01-29 11:25:33 +01:00
FactureTestRounding.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
FichinterTest.php Fix intervention update sql error (#33916) 2025-04-18 20:01:58 +02:00
file_import_company_1.csv Add phpunit to test the rename/move into a corrupted pdf file. 2024-02-17 18:59:57 +01:00
file_pdf_with_js.pdf.jpg Add phpunit to test the rename/move into a corrupted pdf file. 2024-02-17 18:59:57 +01:00
FilesLibMoveDirTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
FilesLibTest.php FIX accounting export: enhance file metadata return and secure access checks (#39218) 2026-07-20 02:50:31 +02:00
FormAdminTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
FormTest.php fix: keep full product label searchable in combo (#39057) 2026-07-06 23:42:58 +02:00
Functions2LibTest.php NEW Add function to manipulate emojis 2024-05-14 18:19:48 +02:00
FunctionsBELibTest.php Execute phpunit for functionsbe in all tests 2025-08-26 05:27:02 +02:00
FunctionsLibTest.php NEW Add PHPUnit test for getElementProperties() (#39550) 2026-08-17 04:44:13 +02:00
FunctionsNumToWordTest.php FIX: French amount in words (cent/vingt agreement, et, hyphens, mille/million, centimes) (#38945) 2026-06-22 14:34:52 +02:00
GetUrlLibTest.php Fix use of numeric hostname 2026-07-29 12:16:48 +02:00
HolidayTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
ImagesLibTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
imap_header.txt
imap_htmlmsg.txt Clean files 2026-01-07 19:01:54 +01:00
imap_plaintext.txt Clean files 2026-01-07 19:01:54 +01:00
img250x20.png
img250x50.jpg
imgsvgwithjs.svg
ImportTest.php Qual: Improve test messages to help locate errors + php-cs-fixer on tests (#28272) 2024-02-19 15:28:21 +01:00
InventoryTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
JsonLibTest.php Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-07-13 17:47:55 +02:00
KnowledgeRecordTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
LangTest.php fix french comments (#39019) 2026-06-30 12:25:04 +02:00
LesscTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
LoanTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
MarginsLibTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
ModuleBuilderLibTest.php NEW: ModuleBuilder - selectable object tabs (+ fixes for multi-object generation) (#38570) 2026-06-09 19:04:00 +02:00
ModuleBuilderShowOnComboboxTest.php FIX : ModuleBuilder apply showoncombobox to fields other than ref/code (#38904) 2026-06-21 23:30:54 +02:00
ModulesTest.php Try fix CI 2026-06-21 19:16:53 +02:00
MouvementStockTest.php FIX Stock balance truncated to int for fractional qty (#38806) 2026-06-15 14:18:44 +02:00
MultiCurrencyTest.php NEW: Add phpunit test for MultiCurrency class (#39534) 2026-08-15 16:03:41 +02:00
NamingContractTest.php don't take care of some french comments and fix false positive (#39007) 2026-06-29 19:28:28 +02:00
NumberingModulesTest.php Debug v23 2026-02-17 16:59:07 +01:00
ODFTest.php QUAL Add get_substitutionarray_each_var_object in phpunit 2025-02-06 12:04:41 +01:00
OpensurveysondageTest.php Add opensurveysondage phpunit test (#39522) 2026-08-14 14:57:48 +02:00
PaiementTest.php add new test (#39001) 2026-07-01 19:22:08 +02:00
PaymentVATTest.php NEW: Add phpunit test for PaymentVAT class (#39544) 2026-08-15 18:21:48 +02:00
PaypalTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
PdfDocTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
PgsqlTest.php Try to fix CI for pgsql 2025-12-22 03:45:20 +01:00
phpunit.dtd
phpunittest.xml Update files after moving build into dev/ 2025-01-05 14:46:26 +01:00
PricesTest.php Qual: Fix french comments and improve detector (#39026) 2026-07-01 12:26:51 +02:00
ProductTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
ProfidLibTest.php FIX isValidTinForES() rejects almost every Spanish NIE starting with T (#39384) 2026-08-04 22:48:15 +02:00
ProjectTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
PropalTest.php Fix regression 2025-10-16 21:26:35 +02:00
ReceptionTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
RepositoryTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
RestAPIContactTest.php Fix travis 2025-03-24 21:42:16 +01:00
RestAPIDocumentTest.php Fix travis 2025-03-24 21:43:38 +01:00
RestAPIMoTest.php Fix travis 2025-03-24 21:44:57 +01:00
RestAPIUserTest.php Fix travis 2025-03-24 18:23:31 +01:00
ScriptsTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
SecurityGETPOSTTest.php Adapt phpunit to the new sanitization of restricthtml 2026-07-29 01:14:59 +02:00
SecurityLoginTest.php Code comment 2025-12-18 15:07:54 +01:00
SecurityTest.php Fix use of numeric hostname 2026-07-29 12:16:48 +02:00
SocieteTest.php FIX #37826 country_code must be an ISO code, not a label (#39191) 2026-07-16 13:56:33 +02:00
StripeTest.php Fix round in stripe amount 2026-01-21 21:00:37 +01:00
SupplierProposalTest.php phpunit more complete 2025-10-17 19:39:45 +02:00
TargetTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
test.php fix CI v22 (#34902) 2025-08-09 14:55:11 +02:00
testemailing.txt Clean files 2026-01-07 19:01:54 +01:00
testvirus.txt
textiso.txt Clean files 2026-01-07 19:01:54 +01:00
textutf8.txt Clean files 2026-01-07 19:01:54 +01:00
TicketTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
TtcRoundingTest.php FIX #37658 - Add unit tests for TTC unit price rounding and add fixes for others objects (proposals, orders, invoices and contracts) (#39055) 2026-08-11 19:48:40 +02:00
UserGroupTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
UserTest.php fetch greatest tms for user and fix user creation and modification (#35145) 2025-09-01 19:21:54 +02:00
UtilsTest.php Test 2026-06-27 14:30:17 +02:00
WebservicesInvoicesTest.php Better error message 2026-06-21 13:10:56 +02:00
WebservicesOrdersTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
WebservicesOtherTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
WebservicesProductsTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
WebservicesThirdpartyTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
WebservicesUserTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00
WebsiteTest.php CI 2026-06-09 18:22:31 +02:00
WorkstationTest.php NEW: Add phpunit test for Workstation class (#39518) 2026-08-14 15:56:13 +02:00
XCalLibTest.php replace deprecated (#31803) 2024-11-14 00:16:43 +01:00