rp = new ComicPressRelatedPosts(); } function testBuildPostTable() { $this->markTestIncomplete(); $posts = array( (object)array('ID' => 1, 'post_date' => '2009-01-01', 'post_title' => 'Post 1', 'guid' => 'post-1'), (object)array('ID' => 2, 'post_date' => '2009-01-02', 'post_title' => 'Post 2', 'guid' => 'post-2'), (object)array('ID' => 3, 'post_date' => '2009-01-03', 'post_title' => 'Post 3', 'guid' => 'post-3'), ); foreach ($posts as $post) { wp_insert_post($post); } $categories = array( 1 => array(1), 2 => array(1), 3 => array(2), ); foreach ($categories as $id => $cats) { wp_set_post_categories($id, $cats); } $output = ''; $this->rp->related_categories = array(2); $this->assertEquals($output, $this->rp->build_post_table('Title', $posts)); } }