silverstripe-reports/tests/CommentAdminTest.php
Ingo Schommer 42f237bb8f ENHANCEMENT: added PageComment for CommentAdminTest (from r99069)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@106140 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-06-03 01:43:20 +00:00

36 lines
778 B
PHP

<?php
class CommentAdminTest extends FunctionalTest {
static $fixture_file = 'cms/tests/CMSMainTest.yml';
function testNumModerated() {
$comm = new CommentAdmin();
$resp = $comm->NumModerated();
$this->assertEquals(1, $resp);
}
function testNumUnmoderated(){
$comm = new CommentAdmin();
$resp = $comm->NumUnmoderated();
$this->assertEquals(1, $resp);
}
function testNumSpam(){
$comm = new CommentAdmin();
$resp = $comm->NumSpam();
$this->assertEquals(0, $resp);
}
function testacceptmarked(){
$id = $this->idFromFixture('PageComment', 'Comment1');
$this->logInWithPermission('ADMIN');
$result = $this->get('admin/comments/EditForm/field/Comments/item/2/delete');
$this->assertEquals(200, $result->getStatusCode());
}
}
?>