diff --git a/lib/Cake/tests/Case/Network/Email/SmtpTransportTest.php b/lib/Cake/tests/Case/Network/Email/SmtpTransportTest.php index 332e7b15f..49477968b 100644 --- a/lib/Cake/tests/Case/Network/Email/SmtpTransportTest.php +++ b/lib/Cake/tests/Case/Network/Email/SmtpTransportTest.php @@ -26,15 +26,6 @@ App::uses('SmtpTransport', 'Network/Email'); */ class SmtpTestTransport extends SmtpTransport { -/** - * Config the timeout - * - * @var array - */ - protected $_config = array( - 'timeout' => 30 - ); - /** * Helper to change the socket * @@ -45,16 +36,6 @@ class SmtpTestTransport extends SmtpTransport { $this->_socket = $socket; } -/** - * Helper to change the config attribute - * - * @param array $config - * @return void - */ - public function setConfig($config) { - $this->_config = array_merge($this->_config, $config); - } - /** * Helper to change the CakeEmail * @@ -107,6 +88,7 @@ class StmpProtocolTest extends CakeTestCase { $this->SmtpTransport = new SmtpTestTransport(); $this->SmtpTransport->setSocket($this->socket); + $this->SmtpTransport->config(); } /** @@ -176,7 +158,7 @@ class StmpProtocolTest extends CakeTestCase { $this->socket->expects($this->at(6))->method('write')->with("c3Rvcnk=\r\n"); $this->socket->expects($this->at(7))->method('read')->will($this->returnValue(false)); $this->socket->expects($this->at(8))->method('read')->will($this->returnValue("235 OK\r\n")); - $this->SmtpTransport->setConfig(array('username' => 'mark', 'password' => 'story')); + $this->SmtpTransport->config(array('username' => 'mark', 'password' => 'story')); $this->SmtpTransport->auth(); } @@ -187,7 +169,7 @@ class StmpProtocolTest extends CakeTestCase { */ public function testAuthNoAuth() { $this->socket->expects($this->never())->method('write')->with("AUTH LOGIN\r\n"); - $this->SmtpTransport->setConfig(array('username' => null, 'password' => null)); + $this->SmtpTransport->config(array('username' => null, 'password' => null)); $this->SmtpTransport->auth(); }