title = 'My site'; $writer->site_url = 'http://boo/'; $writer->feed_url = 'http://boo/feed.atom'; $writer->author = array( 'name' => 'Me', 'url' => 'http://me', 'email' => 'me@here' ); $writer->items[] = array( 'title' => 'My article 1', 'updated' => strtotime('-2 days'), 'url' => 'http://foo/bar', 'summary' => 'Super summary', 'content' => '

content

' ); $writer->items[] = array( 'title' => 'My article 2', 'updated' => strtotime('-1 day'), 'url' => 'http://foo/bar2', 'summary' => 'Super summary 2', 'content' => '

content 2   © 2015

', 'author' => array( 'name' => 'Me too', ) ); $writer->items[] = array( 'title' => 'My article 3', 'url' => 'http://foo/bar3' ); $generated_output = $writer->execute(); $expected_output = ' PicoFeed (https://github.com/fguillot/picoFeed) My site My site '.date(DATE_RSS).' http://boo/ me@here (Me) My article 1 http://foo/bar http://foo/bar '.date(DATE_RSS, strtotime('-2 days')).' Super summary content

]]>
My article 2 http://foo/bar2 http://foo/bar2 '.date(DATE_RSS, strtotime('-1 day')).' Super summary 2 content 2   © 2015

]]>
My article 3 http://foo/bar3 http://foo/bar3 '.date(DATE_RSS).'
'; $this->assertEquals($expected_output, $generated_output); } }