From a28e8ba4e78f645d7b44e7a91ddb96abf7448968 Mon Sep 17 00:00:00 2001 From: Juan Basso Date: Sun, 17 Apr 2011 11:21:04 -0400 Subject: [PATCH] Removed unused code. --- .../Controller/Component/EmailComponent.php | 65 +------------------ .../Component/EmailComponentTest.php | 25 ------- 2 files changed, 1 insertion(+), 89 deletions(-) diff --git a/lib/Cake/Controller/Component/EmailComponent.php b/lib/Cake/Controller/Component/EmailComponent.php index cc61b8cce..25f7c7435 100644 --- a/lib/Cake/Controller/Component/EmailComponent.php +++ b/lib/Cake/Controller/Component/EmailComponent.php @@ -150,14 +150,6 @@ class EmailComponent extends Component { */ public $template = null; -/** - * as per RFC2822 Section 2.1.1 - * - * @var integer - * @access public - */ - public $lineLength = 70; - /** * Line feed character(s) to be used when sending using mail() function * By default PHP_EOL is used. @@ -168,12 +160,7 @@ class EmailComponent extends Component { * @var string * @access public */ - var $lineFeed = PHP_EOL; - -/** - * @deprecated see lineLength - */ - protected $_lineLength = null; + public $lineFeed = PHP_EOL; /** * What format should the email be sent in @@ -291,49 +278,6 @@ class EmailComponent extends Component { */ public $messageId = true; -/** - * Temporary store of message header lines - * - * @var array - * @access protected - */ - protected $_header = array(); - -/** - * If set, boundary to use for multipart mime messages - * - * @var string - * @access protected - */ - protected $_boundary = null; - -/** - * Temporary store of message lines - * - * @var array - * @access protected - */ - protected $_message = array(); - -/** - * Variable that holds SMTP connection - * - * @var resource - * @access protected - */ - protected $_smtpConnection = null; - -/** - * Constructor - * - * @param ComponentCollection $collection A ComponentCollection this component can use to lazy load its components - * @param array $settings Array of configuration settings. - */ - public function __construct(ComponentCollection $collection, $settings = array()) { - $this->Controller = $collection->getController(); - parent::__construct($collection, $settings); - } - /** * Initialize component * @@ -345,13 +289,6 @@ class EmailComponent extends Component { } } -/** - * Startup component - * - * @param object $controller Instantiating controller - */ - public function startup($controller) {} - /** * Send an email using the specified content, template and layout * diff --git a/lib/Cake/tests/Case/Controller/Component/EmailComponentTest.php b/lib/Cake/tests/Case/Controller/Component/EmailComponentTest.php index 4acd85638..dfd594b9c 100644 --- a/lib/Cake/tests/Case/Controller/Component/EmailComponentTest.php +++ b/lib/Cake/tests/Case/Controller/Component/EmailComponentTest.php @@ -20,7 +20,6 @@ */ App::uses('Controller', 'Controller'); App::uses('EmailComponent', 'Controller/Component'); -App::uses('CakeSocket', 'Network'); /** * EmailTestComponent class @@ -29,29 +28,6 @@ App::uses('CakeSocket', 'Network'); */ class EmailTestComponent extends EmailComponent { -/** - * Convenience getter for testing. - * - * @access public - * @return string - */ - function getMessage() { - if (empty($this->_message)) { - return array(); - } - return $this->_message; - } - -/** - * Convenience getter for testing. - * - * @access protected - * @return string - */ - function _getMessage() { - return $this->_message; - } - /** * Convenience method for testing. * @@ -783,7 +759,6 @@ HTMLBLOC; $this->assertNull($this->Controller->EmailTest->date); $this->assertNull($this->Controller->EmailTest->subject); $this->assertNull($this->Controller->EmailTest->additionalParams); - $this->assertIdentical($this->Controller->EmailTest->getMessage(), array()); $this->assertNull($this->Controller->EmailTest->smtpError); $this->assertIdentical($this->Controller->EmailTest->attachments, array()); $this->assertNull($this->Controller->EmailTest->textMessage);