Laravel Framework 5.4.13
Basically i`m working with video tutorial: http://ift.tt/1lwXcsC
But when i get to 4:30 in video i get this error:
Fatal error: Interface 'Tests\Browser\Swift_Events_EventListener' not found in C:\xampp\htdocs\XXX\tests\Browser\MailTracker.php on line 46 PHP Fatal error: Interface 'Tests\Browser\Swift_Events_EventListener' not found in C:\xampp\htdocs\XXX\tests\Browser\MailTracker.php on line 46
The code:
<?php
namespace Tests\Browser;
use App\User;
use Tests\DuskTestCase;
use Laravel\Dusk\Chrome;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Tests\TestCase;
class MailTracker extends DuskTestCase
{
public function SetUp()
{
parent::SetUp();
Mail::getSwiftMailer()
->registerPlugin(new TestingMailEventListener);
}
/**
* A basic browser test example.
*
* @return void
*/
public function testBasicExample()
{
Mail::raw('Hello', function ($message){
$message->to('foo@bar.com');
$message->from('bar@foo.com');
});
}
protected function seeEmailWasSent()
{
}
}
class TestingMailEventListener implements Swift_Events_EventListener
{
public function beforeSendPerformed($event)
{
$message = $event->getMessage();
dd($message);
}
}
Any ideas what is causing this problem?
Aucun commentaire:
Enregistrer un commentaire