eml = $this->make('e107Email'); } catch(Exception $e) { $this->assertTrue(false, "Couldn't load e107Email object"); } $this->eml->__construct(); } /* public function testAllSent() { } public function testProcessShortcodes() { } */ public function testArraySet() { $eml = array( 'subject' => "[URGENT EXAMPLE]", 'sender_email' => "noreply@test.com", 'sender_name' => "Test Person", 'replyto' => "", 'html' => true, 'priority' => 1, 'template' => 'default', 'body' => "This is the body text", 'cc' => '' ); $this->eml->arraySet($eml); $this->assertStringContainsString("noreply@test.com", $this->eml->From); $this->assertStringContainsString("Test Person", $this->eml->FromName); $this->assertStringContainsString("e107: [URGENT EXAMPLE] ", $this->eml->Subject); $this->assertStringContainsString("This is the body text", $this->eml->Body); $this->assertStringContainsString("

eml->Body); } /* public function testMakePrintableAddress() { } public function testPreview() { } public function testAddInlineImages() { } */ public function testMsgHTML() { $html = "\n Hi Joe
Check out
http://e107.org

Thanks,
Admin

Website:https://e107.org
Github:https://github.com/e107inc/
"; $this->eml->MsgHTML($html); $result = json_encode($this->eml->AltBody); $expected = '"Hi Joe\\nCheck out http:\\/\\/e107.org\\n\\nThanks,\\nAdmin\\n\\nWebsite:\\thttps:\\/\\/e107.org\\t\\nGithub:\\thttps:\\/\\/github.com\\/e107inc\\/"'; $this->assertSame($expected, $result); } /* public function testSendEmail() { $eml = array( 'subject' => "[URGENT EXAMPLE] ", 'sender_email' => "noreply@test.com", 'sender_name' => "Test", 'replyto' => "", 'html' => true, 'priority' => 1, 'template' => 'default', 'body' => "This is the body text", 'cc' => '' ); $this->eml->sendEmail('test@nowhere.com',"This is the subject", $eml); } public function testSetDebug() { } public function testAddAddressList() { } public function testAttach() { } public function testMakeBody() { } */ }