Last active
December 16, 2015 01:09
-
-
Save tikitikipoo/5352913 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App::uses('CakeEmail', 'Network/Email'); | |
class DummyEmail | |
{ | |
private $Email; | |
public function __construct($Email) | |
{ | |
$this->Email = $Email; | |
$env = env('APP_ENV'); | |
if (strpos($env, 'bdd', 0) === 0) { | |
$this->Email = CakeEmail("test"); | |
} | |
return $this; | |
} | |
public function getEmail() | |
{ | |
$this->Email; | |
} | |
} | |
$Email = new DummyEmail(new CakeEmail('default'))->getEmail(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
なんか違う。。。