post_content = new PostContentManager(); } function testFilterContentRetainsStructuralTags() { $html = '

some paragraph text

'; expect($this->post_content->filterContent($html, 'full'))->equals( '

some paragraph text

' ); $html = 'spanning'; expect($this->post_content->filterContent($html, 'full'))->equals( '

' . $html . '

' ); $html = '
do not strip this
'; expect($this->post_content->filterContent($html, 'full'))->equals( '

do not strip this

' ); $html = ''; expect($this->post_content->filterContent($html, 'full'))->equals( "" ); $html = '
  1. First item
  2. Second item
'; expect($this->post_content->filterContent($html, 'full'))->equals( "
    \n
  1. First item
  2. \n
  3. Second item
  4. \n
" ); } function testFilterContentRetainsHeadings() { $html = '

heading 1

'; expect($this->post_content->filterContent($html, 'full'))->equals($html); $html = '

heading 2

'; expect($this->post_content->filterContent($html, 'full'))->equals($html); $html = '

heading 3

'; expect($this->post_content->filterContent($html, 'full'))->equals($html); $html = '

heading 1

'; expect($this->post_content->filterContent($html, 'excerpt')) ->equals('

heading 1

'); $html = '

heading 2

'; expect($this->post_content->filterContent($html, 'excerpt')) ->equals('

heading 2

'); $html = '

heading 3

'; expect($this->post_content->filterContent($html, 'excerpt')) ->equals('

heading 3

'); } function testFilterContentRetainsTextStyling() { $text_tags = array( 'emphasized>', 'bold', 'strong', 'italic', 'Text
new line' ); foreach($text_tags as $html) { expect($this->post_content->filterContent($html, 'full'))->equals( '

' . $html . '

' ); } } function testFilterContentRetainsImagesAndLinks() { $html = 'some alt'; expect($this->post_content->filterContent($html, 'full'))->equals( '

some alt

' ); $html = 'some link'; expect($this->post_content->filterContent($html, 'full'))->equals( '

' . $html . '

' ); } function testFilterContentStripsUndesirableTags() { $undesirable_tags = array( '', '