Skip to content

Commit

Permalink
API Update use statements to match changes in framework
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Aug 29, 2024
1 parent 351ab80 commit 65f1b6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Context/EmailContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use SilverStripe\BehatExtension\Utility\TestMailer;
use SilverStripe\Core\Injector\Injector;
use Symfony\Component\DomCrawler\Crawler;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Mailer\Transport\NullTransport;

Expand Down Expand Up @@ -50,6 +50,7 @@ public function before(BeforeScenarioScope $event)
{
// Also set through the 'supportbehat' extension
// to ensure its available both in CLI execution and the tested browser session
/** @var EventDispatcherInterface $dispatcher */
$dispatcher = Injector::inst()->get(EventDispatcherInterface::class . '.mailer');
$transport = new NullTransport($dispatcher);
$this->mailer = new TestMailer($transport, $dispatcher);
Expand Down
2 changes: 1 addition & 1 deletion src/Utility/TestMailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use InvalidArgumentException;
use SilverStripe\Control\Email\Email;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use SilverStripe\Dev\TestMailer as BaseTestMailer;
use SilverStripe\TestSession\TestSessionEnvironment;
use Symfony\Component\Mailer\Envelope;
Expand Down

0 comments on commit 65f1b6a

Please sign in to comment.