Added some vars to reset.

This commit is contained in:
Juan Basso 2011-03-01 14:25:25 -03:00
parent 82835a3566
commit e6c8171d1f
2 changed files with 14 additions and 0 deletions

View file

@ -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();
}
}

View file

@ -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());
}
}