NewsletterRecipientTaskHandler example

static::assertIsString($salutationSql);
        $this->getContainer()->get(Connection::class)->executeStatement($salutationSql);

        $recipientSql = file_get_contents(__DIR__ . '/../fixtures/recipient.sql');
        static::assertIsString($recipientSql);
        $recipientSql = str_replace(':createdAt', (new \DateTime())->format(Defaults::STORAGE_DATE_TIME_FORMAT)$recipientSql);
        $this->getContainer()->get(Connection::class)->executeStatement($recipientSql);
    }

    private function getTaskHandler(): NewsletterRecipientTaskHandler
    {
        return new NewsletterRecipientTaskHandler(
            $this->getContainer()->get('scheduled_task.repository'),
            $this->getContainer()->get('newsletter_recipient.repository')
        );
    }
}
Home | Imprint | This part of the site doesn't use cookies.