mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Added some vars to reset.
This commit is contained in:
parent
82835a3566
commit
e6c8171d1f
2 changed files with 14 additions and 0 deletions
|
@ -536,6 +536,15 @@ class CakeEmail {
|
|||
* @return void
|
||||
*/
|
||||
public function reset() {
|
||||
$this->_to = array();
|
||||
$this->_from = array();
|
||||
$this->_replyTo = array();
|
||||
$this->_readReceipt = array();
|
||||
$this->_returnPath = array();
|
||||
$this->_cc = array();
|
||||
$this->_bcc = array();
|
||||
$this->_subject = '';
|
||||
$this->_headers = array();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -140,6 +140,11 @@ class CakeEmailTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function testReset() {
|
||||
$this->CakeEmail->setTo('cake@cakephp.org');
|
||||
$this->assertIdentical($this->CakeEmail->getTo(), array('cake@cakephp.org' => 'cake@cakephp.org'));
|
||||
|
||||
$this->CakeEmail->reset();
|
||||
$this->assertIdentical($this->CakeEmail->getTo(), array());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue