Skip to content

Commit 405011a

Browse files
committed
createSubscriberList
1 parent 9adb0ec commit 405011a

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/Domain/Common/Repository/AbstractRepository.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ public function save(DomainModel $model): void
3131
$this->getEntityManager()->flush();
3232
}
3333

34+
public function persist(DomainModel $model): void
35+
{
36+
$this->getEntityManager()->persist($model);
37+
}
38+
3439
/**
3540
* Removes $model and flushes the entity manager change list.
3641
*

src/Domain/Subscription/Service/Manager/SubscriberListManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function createSubscriberList(
2929
->setListPosition($subscriberListDto->listPosition)
3030
->setPublic($subscriberListDto->isPublic);
3131

32-
$this->subscriberListRepository->save($subscriberList);
32+
$this->subscriberListRepository->persist($subscriberList);
3333

3434
return $subscriberList;
3535
}

tests/Unit/Domain/Subscription/Service/Manager/SubscriberListManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function testCreateSubscriberList(): void
3636

3737
$this->subscriberListRepository
3838
->expects($this->once())
39-
->method('save')
39+
->method('persist')
4040
->with($this->isInstanceOf(SubscriberList::class));
4141

4242
$result = $this->manager->createSubscriberList($request, $admin);

0 commit comments

Comments
 (0)