1 | <?php |
||
8 | class EmailTest extends \PHPUnit_Framework_TestCase { |
||
9 | |||
10 | public function testSetSubject() { |
||
11 | $email = new Email(); |
||
12 | $email->setSubject('My Subject'); |
||
13 | $this->assertEquals('My Subject', $email->getSubject()); |
||
14 | } |
||
15 | |||
16 | public function testSetBodyInStringMode() { |
||
17 | $email = new Email(); |
||
18 | $email->setContent('My body in string mode'); |
||
19 | $this->assertEquals('My body in string mode', $email->getContent()); |
||
20 | } |
||
21 | |||
22 | public function testSetBodyInBlockMode() { |
||
23 | $email = new Email(); |
||
24 | $body = new Block('this-block-doent-exist'); |
||
25 | $email->setContent($body); |
||
26 | |||
27 | $this->assertTrue($email->getContent() instanceof Block); |
||
28 | $this->assertEquals('', $email->getContent()); |
||
29 | } |
||
30 | |||
31 | } |
||
32 |