Fix can run ws test several times

This commit is contained in:
Laurent Destailleur 2019-08-31 14:27:02 +02:00
parent 7d51c62d93
commit 4e5e5542ff

View File

@ -129,9 +129,15 @@ class WebservicesInvoicesTest extends PHPUnit\Framework\TestCase
$societe->particulier=0;
$societe->create($user);
if (empty($societe->id))
{
// Create failed, may be the thirdparty already exists, we fetch it
$societe->fetch(0, 'name');
}
self::$socid = $societe->id;
print __METHOD__." societe created id=".$societe->id."\n";
print __METHOD__." societe created or found with id=".$societe->id."\n";
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.