diff --git a/test/phpunit/DiscountTest.php b/test/phpunit/DiscountTest.php index e7c41336d3e..b360f7dc61f 100644 --- a/test/phpunit/DiscountTest.php +++ b/test/phpunit/DiscountTest.php @@ -140,8 +140,14 @@ class DiscountTest extends PHPUnit\Framework\TestCase $langs=$this->savlangs; $db=$this->savdb; + $soc = new Societe($db); + $soc->name = "CommandeTest Unittest"; + $socid = $soc->create($user); + $this->assertLessThan($socid, 0, $soc->errorsToString()); + $localobject=new DiscountAbsolute($db); $localobject->initAsSpecimen(); + $localobject->fk_soc = $socid; $result=$localobject->create($user); $this->assertLessThan($result, 0);