fix tests and replace file_exists

This commit is contained in:
Dennis Eichhorn 2020-10-08 15:12:24 +02:00
parent e57dc289d9
commit 95773e3969
2 changed files with 16 additions and 0 deletions

View File

@ -27,6 +27,10 @@ use phpOMS\Utils\RnG\Text;
*/
class PromotionMapperTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\Marketing\Models\PromotionMapper
* @group module
*/
public function testCRUD() : void
{
$promotion = new Promotion();
@ -86,6 +90,10 @@ class PromotionMapperTest extends \PHPUnit\Framework\TestCase
self::assertEquals(\end($expected)->getName(), \end($actual)->getName());
}
/**
* @covers Modules\Marketing\Models\PromotionMapper
* @group module
*/
public function testNewest() : void
{
$newest = PromotionMapper::getNewest(1);

View File

@ -24,6 +24,10 @@ use phpOMS\Localization\Money;
*/
class PromotionTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\Marketing\Models\Promotion
* @group module
*/
public function testDefault() : void
{
$promotion = new Promotion();
@ -44,6 +48,10 @@ class PromotionTest extends \PHPUnit\Framework\TestCase
self::assertInstanceOf('\Modules\Tasks\Models\Task', $promotion->getTask(0));
}
/**
* @covers Modules\Marketing\Models\Promotion
* @group module
*/
public function testSetGet() : void
{
$promotion = new Promotion();