@@ 64-72 (lines=9) @@ | ||
61 | ||
62 | } |
|
63 | ||
64 | function testGetNumPosts() { |
|
65 | // test holder with posts |
|
66 | $fh = $this->objFromFixture("ForumHolder", "fh"); |
|
67 | $this->assertEquals($fh->getNumPosts(), 24); |
|
68 | ||
69 | // test holder that doesn't have posts |
|
70 | $fh2 = $this->objFromFixture("ForumHolder", "fh2"); |
|
71 | $this->assertEquals($fh2->getNumPosts(), 0); |
|
72 | } |
|
73 | ||
74 | function testGetNumTopics() { |
|
75 | // test holder with posts |
|
@@ 74-82 (lines=9) @@ | ||
71 | $this->assertEquals($fh2->getNumPosts(), 0); |
|
72 | } |
|
73 | ||
74 | function testGetNumTopics() { |
|
75 | // test holder with posts |
|
76 | $fh = $this->objFromFixture("ForumHolder", "fh"); |
|
77 | $this->assertEquals($fh->getNumTopics(), 6); |
|
78 | ||
79 | // test holder that doesn't have posts |
|
80 | $fh2 = $this->objFromFixture("ForumHolder", "fh2"); |
|
81 | $this->assertEquals($fh2->getNumTopics(), 0); |
|
82 | } |
|
83 | ||
84 | function testGetNumAuthors() { |
|
85 | // test holder with posts |
|
@@ 84-92 (lines=9) @@ | ||
81 | $this->assertEquals($fh2->getNumTopics(), 0); |
|
82 | } |
|
83 | ||
84 | function testGetNumAuthors() { |
|
85 | // test holder with posts |
|
86 | $fh = $this->objFromFixture("ForumHolder", "fh"); |
|
87 | $this->assertEquals($fh->getNumAuthors(), 4); |
|
88 | ||
89 | // test holder that doesn't have posts |
|
90 | $fh2 = $this->objFromFixture("ForumHolder", "fh2"); |
|
91 | $this->assertEquals($fh2->getNumAuthors(), 0); |
|
92 | } |
|
93 | ||
94 | function testGetRecentPosts() { |
|
95 | // test holder with posts |