Set newsletter Entity when stdClass instance given

[MAILPOET-3356]
This commit is contained in:
Jan Lysý
2021-01-07 11:12:35 +01:00
committed by Veljko V
parent 7938c65cda
commit e66ad88146
2 changed files with 15 additions and 2 deletions

View File

@ -23,9 +23,13 @@ class ShortcodesTest extends \MailPoetTest {
}
public function testItCanReplaceShortcodes() {
$queue = $newsletter = (object)[
$newsletter = (object)[
'id' => 1,
];
$queue = SendingQueue::createOrUpdate([
'task_id' => 1,
'newsletter_id' => 1,
]);
$subscriber = Subscriber::createOrUpdate([
'email' => 'test@xample.com',
'first_name' => 'John',