/** * Make sure that superuser has permission to edit his own comments. * * @depends testCommentViewAccess */ public function testCommentEditAccess() { $path = new Path('comment/' . self::$articleCommentObject->getId() . '/edit'); $this->assertTrue($path->hasAccess(), "Superuser does not have permission to edit his own comment."); $this->assertTrue(self::$articleCommentObject->hasUpdateAccess(), "Superuser does not have permission to edit his own comment."); }
/** * Make sure that anonymous user does not have permission to edit a comment. */ public function testCommentEditAccess() { $path = new Path('comment/' . self::$articleCommentObject->getId() . '/edit'); $this->assertFalse($path->hasAccess(), "Anonymous user has permission to edit a comment."); $this->assertFalse(self::$articleCommentObject->hasUpdateAccess(), "Anonymous user has permission to edit a comment."); }