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 My site http://boo/ '.date(DATE_ATOM).' Me me@here http://me My article 1 http://foo/bar '.date(DATE_ATOM, strtotime('-2 days')).' Super summary content

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

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