Files
dolibarr/test/phpunit
Alexandre Janniaux da3b4d10df FIX: CompanyBankAccountTest: fix create when no societe exists
The testCompanyBankAccountCreate() is using the default value for
CompanyBankAccount::socid, which is defined by
CompanyBankAccount::initAsSpecimen to `0`. But if no companies have been
created, the test will fail with the following error:

    Failed asserting that 0 is less than -1.

Or with the additional logging:

    ERROR:  23503: insert or update on table "llx_societe_rib" violates foreign key constraint "llx_societe_rib_fk_societe"                                                   
    DETAIL:  Key (fk_soc)=(1) is not present in table "llx_societe".                                                                                                          
    SCHEMA NAME:  public                                                                                                                                                      
    TABLE NAME:  llx_societe_rib                                                                                                                                              
    CONSTRAINT NAME:  llx_societe_rib_fk_societe                                                                                                                              
    LOCATION:  ri_ReportViolation, ri_triggers.c:2596, ERROR:  23503: insert or update on table "llx_societe_rib" violates foreign key constraint "llx_societe_rib_fk_societe"
    DETAIL:  Key (fk_soc)=(1) is not present in table "llx_societe".                                                                                                          
    SCHEMA NAME:  public                                                                                                                                                      
    TABLE NAME:  llx_societe_rib                                                                                                                                              
    CONSTRAINT NAME:  llx_societe_rib_fk_societe                                                                                                                              
    LOCATION:  ri_ReportViolation, ri_triggers.c:2596                                                                                                                         
    Failed asserting that 0 is less than -1.

The test doesn't really depends on specific test data so we can create
the company directly instead.
2023-12-17 15:55:26 +01:00
..
2023-09-10 19:41:14 +02:00
2023-12-04 11:22:28 +01:00
2023-12-04 11:22:28 +01:00
2023-12-04 11:22:28 +01:00
2023-12-04 11:22:28 +01:00
2023-09-09 21:16:58 +02:00
2023-11-28 15:35:31 +01:00
2023-12-04 11:22:28 +01:00
2023-11-28 15:35:31 +01:00
2023-12-04 11:22:28 +01:00
2023-10-20 03:59:02 +02:00
2023-12-04 11:22:28 +01:00
2023-11-28 15:35:31 +01:00
2023-12-04 11:22:28 +01:00
2023-12-04 11:22:28 +01:00
2023-11-27 13:26:44 +01:00
2023-12-04 11:22:28 +01:00
2023-12-04 11:22:28 +01:00
2023-12-04 11:22:28 +01:00
2023-12-04 11:22:28 +01:00
2023-11-28 15:35:31 +01:00
2023-12-04 11:22:28 +01:00
2023-12-04 11:22:28 +01:00
2023-09-10 19:41:14 +02:00
2023-11-06 00:56:44 +01:00
2023-12-04 11:22:28 +01:00
2023-08-12 01:08:04 +02:00
2023-12-04 11:22:28 +01:00
2023-12-04 11:22:28 +01:00
2023-12-04 11:22:28 +01:00
2023-06-04 19:46:44 +02:00
2023-08-04 17:26:38 +02:00
2023-11-27 13:26:44 +01:00
2023-12-04 11:22:28 +01:00
2023-12-04 11:22:28 +01:00
2023-12-04 11:22:28 +01:00
2023-08-26 00:43:51 +02:00
2023-12-04 11:22:28 +01:00
2023-12-04 11:22:28 +01:00
2023-12-04 11:22:28 +01:00
2023-12-04 11:22:28 +01:00
2023-12-04 11:22:28 +01:00
2023-12-04 11:22:28 +01:00
2023-12-04 11:22:28 +01:00
2023-09-05 00:49:01 +02:00