|
@@ 219-227 (lines=9) @@
|
| 216 |
|
$this->assertEquals($stickies->Count(), '0'); |
| 217 |
|
} |
| 218 |
|
|
| 219 |
|
function testTopics() { |
| 220 |
|
$forumWithPosts = $this->objFromFixture("Forum", "general"); |
| 221 |
|
|
| 222 |
|
$this->assertEquals($forumWithPosts->getTopics()->Count(), '4'); |
| 223 |
|
|
| 224 |
|
$forumWithoutPosts = $this->objFromFixture("Forum", "forum1cat2"); |
| 225 |
|
$result = $forumWithoutPosts->getTopics(); |
| 226 |
|
$this->assertEquals(0, $result->count()); |
| 227 |
|
} |
| 228 |
|
|
| 229 |
|
function testGetLatestPost() { |
| 230 |
|
$forumWithPosts = $this->objFromFixture("Forum", "general"); |
|
@@ 239-247 (lines=9) @@
|
| 236 |
|
$this->assertNull($forumWithoutPosts->getLatestPost()); |
| 237 |
|
} |
| 238 |
|
|
| 239 |
|
function testGetNumTopics() { |
| 240 |
|
$forumWithPosts = $this->objFromFixture("Forum", "general"); |
| 241 |
|
|
| 242 |
|
$this->assertEquals($forumWithPosts->getNumTopics(), 6); |
| 243 |
|
|
| 244 |
|
$forumWithoutPosts = $this->objFromFixture("Forum", "forum1cat2"); |
| 245 |
|
|
| 246 |
|
$this->assertEquals($forumWithoutPosts->getNumTopics(), 0); |
| 247 |
|
} |
| 248 |
|
|
| 249 |
|
function testGetTotalAuthors() { |
| 250 |
|
$forumWithPosts = $this->objFromFixture("Forum", "general"); |
|
@@ 249-257 (lines=9) @@
|
| 246 |
|
$this->assertEquals($forumWithoutPosts->getNumTopics(), 0); |
| 247 |
|
} |
| 248 |
|
|
| 249 |
|
function testGetTotalAuthors() { |
| 250 |
|
$forumWithPosts = $this->objFromFixture("Forum", "general"); |
| 251 |
|
|
| 252 |
|
$this->assertEquals($forumWithPosts->getNumAuthors(), 4); |
| 253 |
|
|
| 254 |
|
$forumWithoutPosts = $this->objFromFixture("Forum", "forum1cat2"); |
| 255 |
|
|
| 256 |
|
$this->assertEquals($forumWithoutPosts->getNumAuthors(), 0); |
| 257 |
|
} |
| 258 |
|
|
| 259 |
|
/** |
| 260 |
|
* Note: See {@link testCanModerate()} for detailed permission tests. |