Make segment description mandatory
[MAILPOET-3077]
This commit is contained in:
committed by
Veljko V
parent
c78922c12e
commit
2f270575f3
@ -50,7 +50,7 @@ class SegmentEntity {
|
||||
*/
|
||||
private $dynamicFilters;
|
||||
|
||||
public function __construct(string $name, string $type, string $description = '') {
|
||||
public function __construct(string $name, string $type, string $description) {
|
||||
$this->name = $name;
|
||||
$this->type = $type;
|
||||
$this->description = $description;
|
||||
|
@ -259,7 +259,7 @@ class NewsletterRepositoryTest extends \MailPoetTest {
|
||||
$this->entityManager->persist($queue);
|
||||
$newsletter->getQueues()->add($queue);
|
||||
|
||||
$segment = new SegmentEntity("List for newsletter id {$newsletter->getId()}", SegmentEntity::TYPE_DEFAULT);
|
||||
$segment = new SegmentEntity("List for newsletter id {$newsletter->getId()}", SegmentEntity::TYPE_DEFAULT, 'Description');
|
||||
$this->entityManager->persist($segment);
|
||||
|
||||
$subscriber = new SubscriberEntity();
|
||||
|
@ -180,7 +180,7 @@ class EmailActionTest extends \MailPoetTest {
|
||||
|
||||
private function getSegmentFilter(string $action, int $newsletterId, int $linkId = null): DynamicSegmentFilterEntity {
|
||||
return new DynamicSegmentFilterEntity(
|
||||
new SegmentEntity('segment', SegmentEntity::TYPE_DYNAMIC),
|
||||
new SegmentEntity('segment', SegmentEntity::TYPE_DYNAMIC, 'Description'),
|
||||
[
|
||||
'segmentType' => DynamicSegmentFilterEntity::TYPE_EMAIL,
|
||||
'action' => $action,
|
||||
|
@ -67,7 +67,7 @@ class UserRoleTest extends \MailPoetTest {
|
||||
|
||||
private function getSegmentFilter(string $role): DynamicSegmentFilterEntity {
|
||||
return new DynamicSegmentFilterEntity(
|
||||
new SegmentEntity('segment', SegmentEntity::TYPE_DYNAMIC),
|
||||
new SegmentEntity('segment', SegmentEntity::TYPE_DYNAMIC, 'Description'),
|
||||
[
|
||||
'segmentType' => DynamicSegmentFilterEntity::TYPE_USER_ROLE,
|
||||
'wordpressRole' => $role,
|
||||
|
Reference in New Issue
Block a user