/** * Test getPublicRepliesToPost */ function testGetPublicRepliesToPost() { $dao = new PostMySQLDAO(); $posts = $dao->getPublicRepliesToPost(41); $this->assertEqual(sizeof($posts), 2); $this->assertEqual($posts[0]->post_text, '@shutterbug Nice shot!', "post reply"); $this->assertEqual($posts[0]->author->username, 'user1', "Post author"); $this->assertEqual($posts[1]->post_text, '@shutterbug This is a link post reply http://example.com/', "post reply"); $this->assertEqual($posts[1]->post_id, 133, "post ID"); $this->assertEqual($posts[1]->author->username, 'linkbaiter', "Post author"); $this->assertEqual($posts[1]->link->expanded_url, 'http://example.com/expanded-link.html', "Expanded URL"); }