Skip to content

Commit

Permalink
Don't set layout based on mailer's name.
Browse files Browse the repository at this point in the history
Closes #7234
  • Loading branch information
ADmad committed Aug 15, 2015
1 parent b73e3f6 commit 46980b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/Mailer/Mailer.php
Expand Up @@ -73,7 +73,7 @@
* if ($entity->isNew()) {
* $this->send('welcome', [$entity]);
* }
* }
* }
* ```
*
* The onRegistration method converts the application event into a mailer method.
Expand All @@ -82,6 +82,7 @@
*/
abstract class Mailer implements ArrayAccess, EventListenerInterface
{

use ModelAwareTrait;

/**
Expand Down Expand Up @@ -116,10 +117,6 @@ public function __construct(Email $email = null)
$email = new Email();
}

if ($this->layout === null) {
$this->layout = Inflector::underscore($this->getName());
}

$this->_email = $email;
}

Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Mailer/MailerTest.php
Expand Up @@ -28,7 +28,6 @@ public function testConstructor()
{
$mailer = new TestMailer();
$this->assertInstanceOf('Cake\Mailer\Email', $mailer->getEmailForAssertion());
$this->assertEquals('test', $mailer->layout);
}

public function testReset()
Expand Down

0 comments on commit 46980b6

Please sign in to comment.