From 32ac42c0556c58554335109ad1218a5520c3a220 Mon Sep 17 00:00:00 2001 From: chartjes Date: Mon, 25 Jun 2007 21:18:18 +0000 Subject: [PATCH] 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 --- .../libs/controller/components/email.test.php | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 cake/tests/cases/libs/controller/components/email.test.php 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')); + } +} +?>