mirror of
https://github.com/Karaka-Management/oms-Marketing.git
synced 2026-02-17 18:38:41 +00:00
cs fixes, bug fixes, code coverage
This commit is contained in:
parent
b30f51fd96
commit
0e4eb561d6
|
|
@ -12,9 +12,7 @@ If you have a good idea for improvement feel free to create a new issue with all
|
||||||
|
|
||||||
### Issues
|
### Issues
|
||||||
|
|
||||||
Feel free to grab any open issue implement it and create a new pull request. Most issues can be found in the `Project.md` file in the `Docs` repository.
|
Feel free to grab any open issue implement it and create a new pull request. Most issues can be found in the code marked with `@todo` or in the [PROJECT.md](https://github.com/Orange-Management/Docs/blob/master/Project/PROJECT.md) file.
|
||||||
|
|
||||||
The issue information can be used to provide additional information such as priority, difficulty and type. For your first issue try to find a issue marked `[d:first]` or `[d:beginner]`.
|
|
||||||
|
|
||||||
### Code Style
|
### Code Style
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ namespace Modules\Marketing\Models;
|
||||||
use Modules\Admin\Models\Account;
|
use Modules\Admin\Models\Account;
|
||||||
use Modules\Admin\Models\NullAccount;
|
use Modules\Admin\Models\NullAccount;
|
||||||
use Modules\Calendar\Models\Calendar;
|
use Modules\Calendar\Models\Calendar;
|
||||||
use Modules\Tasks\Models\Task;
|
|
||||||
use Modules\Tasks\Models\NullTask;
|
use Modules\Tasks\Models\NullTask;
|
||||||
|
use Modules\Tasks\Models\Task;
|
||||||
use phpOMS\Localization\Money;
|
use phpOMS\Localization\Money;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -15,13 +15,12 @@ declare(strict_types=1);
|
||||||
namespace Modules\Marketing\tests\Models;
|
namespace Modules\Marketing\tests\Models;
|
||||||
|
|
||||||
use Modules\Admin\Models\NullAccount;
|
use Modules\Admin\Models\NullAccount;
|
||||||
|
use Modules\Marketing\Models\ProgressType;
|
||||||
use Modules\Marketing\Models\Promotion;
|
use Modules\Marketing\Models\Promotion;
|
||||||
use Modules\Marketing\Models\PromotionMapper;
|
use Modules\Marketing\Models\PromotionMapper;
|
||||||
use Modules\Marketing\Models\ProgressType;
|
|
||||||
use Modules\Media\Models\Media;
|
use Modules\Media\Models\Media;
|
||||||
use Modules\Tasks\Models\Task;
|
use Modules\Tasks\Models\Task;
|
||||||
use phpOMS\Localization\Money;
|
use phpOMS\Localization\Money;
|
||||||
use phpOMS\Utils\RnG\Text;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
|
|
@ -36,7 +35,7 @@ final class PromotionMapperTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
$promotion = new Promotion();
|
$promotion = new Promotion();
|
||||||
|
|
||||||
$promotion->name = 'Promotionname';
|
$promotion->name = 'Promotionname';
|
||||||
$promotion->description = 'Description';
|
$promotion->description = 'Description';
|
||||||
$promotion->createdBy = new NullAccount(1);
|
$promotion->createdBy = new NullAccount(1);
|
||||||
$promotion->start = new \DateTime('2000-05-05');
|
$promotion->start = new \DateTime('2000-05-05');
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Marketing\tests\Models;
|
namespace Modules\Marketing\tests\Models;
|
||||||
|
|
||||||
use Modules\Marketing\Models\Promotion;
|
|
||||||
use Modules\Marketing\Models\ProgressType;
|
use Modules\Marketing\Models\ProgressType;
|
||||||
|
use Modules\Marketing\Models\Promotion;
|
||||||
use Modules\Media\Models\Media;
|
use Modules\Media\Models\Media;
|
||||||
use Modules\Tasks\Models\Task;
|
use Modules\Tasks\Models\Task;
|
||||||
use phpOMS\Localization\Money;
|
use phpOMS\Localization\Money;
|
||||||
|
|
@ -154,7 +154,7 @@ final class PromotionTest extends \PHPUnit\Framework\TestCase
|
||||||
$this->promotion->description = 'Description';
|
$this->promotion->description = 'Description';
|
||||||
$this->promotion->start = new \DateTime();
|
$this->promotion->start = new \DateTime();
|
||||||
$this->promotion->end = new \DateTime();
|
$this->promotion->end = new \DateTime();
|
||||||
$this->promotion->progress = 10;
|
$this->promotion->progress = 10;
|
||||||
$this->promotion->setProgressType(ProgressType::TASKS);
|
$this->promotion->setProgressType(ProgressType::TASKS);
|
||||||
|
|
||||||
$serialized = $this->promotion->jsonSerialize();
|
$serialized = $this->promotion->jsonSerialize();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user