Added in test for smtp functionality for email component, test not complete

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5347 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
chartjes 2007-06-25 21:18:18 +00:00
parent 5913b5d21e
commit 32ac42c055

View file

@ -0,0 +1,36 @@
<?php
/* SVN FILE: $Id$ */
/**
* Series of tests for email component
*/
require_once LIBS . '/controller/components/email.php';
class EmailTestController extends Controller {
var $name = 'EmailTest';
var $uses = null;
var $components = array('Email');
}
class EmailTest extends CakeTestCase {
var $name = 'Email';
function setUp() {
$this->Controller =& new Controller();
$this->Controller->_initComponents();
$this->View =& new View($this->Controller);
ClassRegistry::addObject('view', $this->View);
}
function testConstruction() {
$this->assertTrue(is_object($this->Email));
}
function testBadSmtpSent() {
$this->Controller->Email->smtpOptions['host'] = 'caketest.com';
$this->Controller->Email->delivery = 'smtp';
$this->assertFalse($this->Email->send('This should not work'));
}
}
?>