Skip to content

Commit

Permalink
Update EmailMessageTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
usernane committed Jul 10, 2023
1 parent cb10b7a commit 55e024c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/webfiori/tests/mail/EmailMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

use PHPUnit\Framework\TestCase;
use webfiori\email\EmailMessage;
use webfiori\email\exceptions\SMTPException;
use webfiori\email\SMTPAccount;
use webfiori\email\SMTPServer;
use webfiori\email\exceptions\SMTPException;
use webfiori\file\File;
/**
* A test class for testing the class 'webfiori\framework\mail\EmailMessage'.
*
Expand Down Expand Up @@ -133,14 +134,14 @@ public function testSend00() {
$message->addBeforeSend(function (EmailMessage $m, TestCase $c) {
$c->assertTrue($m->addAttachment(__DIR__.DIRECTORY_SEPARATOR.'Attach00.txt'));
$c->assertFalse($m->addAttachment('NotExtst.txt'));
$c->assertFalse($m->addAttachment(new \webfiori\file\File(__DIR__.DIRECTORY_SEPARATOR.'not-exist.txt')));
$c->assertTrue($m->addAttachment(new \webfiori\file\File(__DIR__.DIRECTORY_SEPARATOR.'favicon.png')));
$c->assertFalse($m->addAttachment(new File(__DIR__.DIRECTORY_SEPARATOR.'not-exist.txt')));
$c->assertTrue($m->addAttachment(new File(__DIR__.DIRECTORY_SEPARATOR.'favicon.png')));
}, [$this]);
$this->assertEquals('<!DOCTYPE html>'.SMTPServer::NL
. '<html>'.SMTPServer::NL
. ' <head>'.SMTPServer::NL
. ' <title>'.SMTPServer::NL
. ' Default'.SMTPServer::NL
. ' Test Email From WebFiori'.SMTPServer::NL
. ' </title>'.SMTPServer::NL
. ' <meta name=viewport content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">'.SMTPServer::NL
. ' </head>'.SMTPServer::NL
Expand Down

0 comments on commit 55e024c

Please sign in to comment.