From f4a7b745f6d1524673f030e598611f732b889ff0 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Wed, 19 Oct 2022 11:20:59 +1300 Subject: [PATCH] FIX Register against MailerInterface::class --- src/Context/EmailContext.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Context/EmailContext.php b/src/Context/EmailContext.php index 0d8fcc8..4418430 100644 --- a/src/Context/EmailContext.php +++ b/src/Context/EmailContext.php @@ -8,9 +8,9 @@ use Behat\Gherkin\Node\TableNode; use Behat\Mink\Session; use PHPUnit\Framework\Assert; use SilverStripe\BehatExtension\Utility\TestMailer; -use SilverStripe\Control\Email\Mailer; use SilverStripe\Core\Injector\Injector; use Symfony\Component\DomCrawler\Crawler; +use Symfony\Component\Mailer\MailerInterface; /** * Context used to define steps related to email sending. @@ -49,7 +49,7 @@ class EmailContext implements Context // Also set through the 'supportbehat' extension // to ensure its available both in CLI execution and the tested browser session $this->mailer = new TestMailer(); - Injector::inst()->registerService($this->mailer, Mailer::class); + Injector::inst()->registerService($this->mailer, MailerInterface::class); } /**