category ); self::assertEquals( self::normalizeString( '

While checking whether the eZ components would run with the latest PHP 5.2 release candidate we noticed that there are some things that are not backwards compatible with PHP 5.1.

' ), self::normalizeString( $feed->items[0]->Content->encoded ) ); } public function testParseWithFullContentGenerate() { $feed = ezcFeed::parse( dirname( __FILE__ ) . "/data/rss2-content-01.xml" ); $expected = file_get_contents( dirname( __FILE__ ) . "/data/rss2-content-02.xml" ); self::assertEquals( $expected, $feed->generate() ); } public function testParseWithUnknownContentModuleElement() { try { $feed = ezcFeed::parse( dirname( __FILE__ ) . "/data/rss2-dc-02.xml" ); self::fail( 'The expected exception was not thrown.' ); } catch ( ezcFeedUnsupportedModuleElementException $e ) { self::assertEquals( 'The element does not exist for the module .', $e->getMessage() ); } } public function testParseWithUnknownContentItemElement() { try { $feed = ezcFeed::parse( dirname( __FILE__ ) . "/data/rss2-dc-03.xml" ); self::fail( 'The expected exception was not thrown.' ); } catch ( ezcFeedUnsupportedModuleItemElementException $e ) { self::assertEquals( 'The feed item element does not exist for the module .', $e->getMessage() ); } } public static function suite() { return new PHPUnit_Framework_TestSuite( "ezcFeedRss2ContentTest" ); } } ?>