mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Fixes #4464 - Updated comment render() example to match functionality.
This commit is contained in:
@@ -112,10 +112,7 @@ class _blank_front
|
||||
$subject = 'My blank item subject';
|
||||
$rate = true;
|
||||
|
||||
$ret = e107::getComment()->render($plugin, $id, $subject, $rate);
|
||||
|
||||
e107::getRender()->tablerender($ret['caption'],$ret['comment_form']. $ret['comment']);
|
||||
|
||||
return e107::getComment()->render($plugin, $id, $subject, $rate);
|
||||
|
||||
}
|
||||
|
||||
|
148
e107_tests/tests/unit/commentTest.php
Normal file
148
e107_tests/tests/unit/commentTest.php
Normal file
@@ -0,0 +1,148 @@
|
||||
<?php
|
||||
|
||||
|
||||
class commentTest extends \Codeception\Test\Unit
|
||||
{
|
||||
|
||||
/** @var comment */
|
||||
protected $cm;
|
||||
|
||||
protected function _before()
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
$this->cm = e107::getComment();
|
||||
}
|
||||
|
||||
catch(Exception $e)
|
||||
{
|
||||
$this->assertTrue(false, $e->getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
public function testModerateComment()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testForm_comment()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testDelete_comments()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testRecalc_user_comments()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testGetCommentData()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function test__construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testGetCommentPermissions()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testNextprev()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testEnter_comment()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testReplyComment()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testGetCommentType()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testGet_e_comment()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testUpdateComment()
|
||||
{
|
||||
|
||||
}
|
||||
*/
|
||||
public function testRender()
|
||||
{
|
||||
$plugin = '_blank';
|
||||
$id = 3;
|
||||
$subject = 'My blank item subject';
|
||||
$rate = true;
|
||||
|
||||
$result = $this->cm->render($plugin, $id, $subject, $rate);
|
||||
|
||||
$this->assertIsString($result);
|
||||
|
||||
$this->assertStringContainsString('e-comment-form',$result);
|
||||
|
||||
}
|
||||
/*
|
||||
public function testGetComments()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testRender_comment()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testDeleteComment()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testCount_comments()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testParseLayout()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testApproveComment()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testGetTable()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testGet_author_list()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user