public function testNoTemplate() { $msg = new CM_Mail('*****@*****.**'); try { $msg->send(); $this->fail('Should have thrown an exception'); } catch (CM_Exception_Invalid $ex) { $this->assertTrue(true); } $msg->setSubject('blabla'); try { $msg->send(); $this->fail('Should have thrown an exception'); } catch (CM_Exception_Invalid $ex) { $this->assertTrue(true); } $msg->setHtml('<a href="http://www.foo.bar">Hello</a>'); list($subject, $html, $text) = $msg->render(); $this->assertEquals('blabla', $subject); $this->assertEquals('<a href="http://www.foo.bar">Hello</a>', $html); $this->assertEquals('Hello (http://www.foo.bar)', $text); }