public function test_comments_quick_list() { $this->setUser($this->teachers[0]); $comments = comments_quick_list::get_comments(); $this->assertEmpty($comments); $comment = comments_quick_list::add_comment('test', 45, 'red'); $comments = comments_quick_list::get_comments(); $this->assertEquals(count($comments), 1); $first = reset($comments); $this->assertEquals($comment, $first); $commentbyid = comments_quick_list::get_comment($comment->id); $this->assertEquals($comment, $commentbyid); $result = comments_quick_list::remove_comment($comment->id); $this->assertTrue($result); $comments = comments_quick_list::get_comments(); $this->assertEmpty($comments); }