* @license PHP License * @package Wombat * @subpackage unittest */ /** * Unit Test: Mailer * * * @version 0.1.0 * @package Wombat * @subpackage unittest */ class TestCaseMailer extends UnitTestCase { /** * System under test * @var WBMailer */ protected $mailer; public function __construct() { $this->mailer = WBClass::create('WBMailer'); } public function testInit() { WBClass::load('WBMailer'); $this->assertTrue(class_exists('WBMailer', false)); $mailer = WBClass::create('WBMailer'); $this->assertIsA($mailer, 'WBMailer'); } public function testEmail() { $this->mailer->setFrom('Mr Wombat Unittest '); $this->mailer->addRcpt('foo@example.com'); $this->mailer->addRcpt('wombatunittest@mailinator.com'); //$this->mailer->addTo('Mr Foo Bar '); //$this->mailer->addCc('gÖRD Schäüfelberger '); //$this->mailer->addCc('Ms Bar Foo '); $this->mailer->setTemplate('unittest/simple'); $data = array( 'forename' => 'gERD', 'surname' => 'Schaufelberger' ); $this->mailer->setData($data); $this->mailer->send(); } } ?>