Hoa central
Html.php
Go to the documentation of this file.
1 <?php
2 
38 
40 use Hoa\Test;
41 
50 class Html extends Test\Unit\Suite
51 {
52  public function case_basic()
53  {
54  $this
55  ->given(
56  $html = '<strong>foobar</strong>',
57  $content = new SUT($html)
58  )
59  ->when($result = $content->getFormattedContent())
60  ->then
61  ->string($result)
62  ->isEqualTo(
63  'content-transfer-encoding: quoted-printable' . CRLF .
64  'content-disposition: inline' . CRLF .
65  'content-type: text/html; charset=utf-8' . CRLF .
66  CRLF .
67  '<strong>foobar</strong>'
68  );
69  }
70 
71  public function case_html_is_text()
72  {
73  $this
74  ->when($content = new SUT())
75  ->then
76  ->object($content)
77  ->isInstanceOf('Hoa\Mail\Content\Html');
78  }
79 
80  public function case_content_type()
81  {
82  $this
83  ->given($content = new SUT())
84  ->when($result = $content->getHeaders())
85  ->then
86  ->array($result)
87  ->hasKey('content-type')
88 
89  ->string($result['content-type'])
90  ->isEqualTo('text/html; charset=utf-8');
91  }
92 }
$content
Definition: Hoa.php:119