assertEquals( 'AdPlugg_Feed', get_class( $feed ) ); } /** * Test that the filter_feed function leaves simple text content (without * adplugg ads) unchanged. */ public function test_filter_feed_doesnt_modify_simple_text_content() { //set up the test data $content = 'Some simple content'; //get the singleton instance $feed = AdPlugg_Feed::get_instance(); //call the function $filtered_content = $feed->filter_feed( $content ); //assert that the content is unmodified; $this->assertEquals( $content, $filtered_content ); } /** * Test that the filter_feed function leaves simple html content (without * adplugg ads) unchanged. */ public function test_filter_feed_doesnt_modify_simple_html_content() { //set up the test data $content = '

Some simple html content

'; //get the singleton instance $feed = AdPlugg_Feed::get_instance(); //call the function $filtered_content = $feed->filter_feed( $content ); //assert that the content is unmodified; $this->assertEquals( $content, $filtered_content ); } /** * Test that the filter_feed function removes an adplugg ad tag. */ public function test_filter_feed_removes_adplugg_ad_tag() { //set up the test data $content = '

html content with an ad tag

'; $expected_filtered_content = '

html content with an ad tag

'; //get the singleton instance $feed = AdPlugg_Feed::get_instance(); //call the function $filtered_content = $feed->filter_feed( $content ); //assert that the content is unmodified; $this->assertEquals( $expected_filtered_content, $filtered_content ); } }