Skip to content

Commit

Permalink
Fixed EmailTraitTest after removing EmailTrait from TestCase
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyharris committed May 1, 2018
1 parent 88acd45 commit 3812dde
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/TestCase/TestSuite/EmailTraitTest.php
Expand Up @@ -15,6 +15,7 @@
namespace Cake\Test\TestCase\TestSuite;

use Cake\Mailer\Email;
use Cake\TestSuite\EmailTrait;
use Cake\TestSuite\TestCase;
use Cake\TestSuite\TestEmailTransport;
use PHPUnit\Framework\AssertionFailedError;
Expand All @@ -24,6 +25,7 @@
*/
class EmailTraitTest extends TestCase
{
use EmailTrait;

/**
* setUp
Expand All @@ -48,6 +50,8 @@ public function setUp()
Email::setConfigTransport('test_tools', [
'className' => TestEmailTransport::class
]);

TestEmailTransport::replaceAllTransports();
}

/**
Expand All @@ -62,6 +66,8 @@ public function tearDown()
Email::drop('default');
Email::drop('alternate');
Email::dropTransport('test_tools');

TestEmailTransport::clearEmails();
}

/**
Expand Down

0 comments on commit 3812dde

Please sign in to comment.