diff --git a/cake/tests/cases/libs/controller/components/email.test.php b/cake/tests/cases/libs/controller/components/email.test.php new file mode 100644 index 000000000..8cc388baa --- /dev/null +++ b/cake/tests/cases/libs/controller/components/email.test.php @@ -0,0 +1,36 @@ +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')); + } +} +?>