40 | | self::$posts = $factory->post->create_many( $count, array( |
41 | | 'post_author' => self::$user_id, |
42 | | 'post_date' => self::$post_date, |
43 | | 'post_content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec velit massa, ultrices eu est suscipit, mattis posuere est. Donec vitae purus lacus. Cras vitae odio odio.', |
44 | | 'post_excerpt' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', |
45 | | ) ); |
| 41 | self::$posts = array(); |
| 42 | while ( $count-- ) { |
| 43 | self::$posts[] = $factory->post->create( array( |
| 44 | 'post_author' => self::$user_id, |
| 45 | 'post_date' => gmdate( 'Y-m-d H:i:s', self::$post_date + ( 5 * ++$i ) ), // separate post dates 5 seconds apart. |
| 46 | 'post_content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec velit massa, ultrices eu est suscipit, mattis posuere est. Donec vitae purus lacus. Cras vitae odio odio.', |
| 47 | 'post_excerpt' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', |
| 48 | ) ); |
| 49 | } |
| 90 | * Test <rss> element has correct last build date. |
| 91 | */ |
| 92 | function test_get_last_build_date() { |
| 93 | $this->go_to( '/?feed=rss2' ); |
| 94 | $feed = $this->do_rss2(); |
| 95 | $xml = xml_to_array( $feed ); |
| 96 | |
| 97 | // Get the <rss> child element of <xml>. |
| 98 | $rss = xml_find( $xml, 'rss' ); |
| 99 | $last_build_date = $rss[0]['child'][0]['child'][4]['content']; |
| 100 | $this->assertEquals( strtotime( get_last_build_date() ), strtotime( $last_build_date ) ); |
| 101 | } |
| 102 | |
| 103 | /** |