Skip to content
Permalink
Browse files

Fixed the reading of the default email profile

  • Loading branch information...
davidyell committed Sep 28, 2015
1 parent f9f8e22 commit 08f18fc0143f7b3023c0bd171887bafac5f77715
Showing with 3 additions and 1 deletion.
  1. +1 −1 src/Mailer/Email.php
  2. +2 −0 tests/TestCase/Mailer/EmailTest.php
@@ -346,7 +346,7 @@ public function __construct($config = null)
->helpers(['Html']);
if ($config === null) {
$config = Configure::read('Email.default');
$config = static::config('default');
}
if ($config) {
$this->profile($config);
@@ -987,9 +987,11 @@ public function testDefaultProfile()
{
$config = ['test' => 'ok', 'test2' => true];
Configure::write('Email.default', $config);
Email::config(Configure::consume('Email'));
$Email = new Email();
$this->assertSame($Email->profile(), $config);
Configure::delete('Email');
Email::drop('default');
}
/**

0 comments on commit 08f18fc

Please sign in to comment.
You can’t perform that action at this time.