Merge pull request #225 from creative-commoners/pulls/5/symfony-mailer

FIX Register against MailerInterface::class
This commit is contained in:
Guy Sartorelli 2022-10-19 15:52:23 +13:00 committed by GitHub
commit dfd0ad0871
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}
/**