diff --git a/e107_plugins/_blank/_blank.php b/e107_plugins/_blank/_blank.php index edd3f1505..b49949efd 100644 --- a/e107_plugins/_blank/_blank.php +++ b/e107_plugins/_blank/_blank.php @@ -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); } diff --git a/e107_tests/tests/unit/commentTest.php b/e107_tests/tests/unit/commentTest.php new file mode 100644 index 000000000..4aff739ff --- /dev/null +++ b/e107_tests/tests/unit/commentTest.php @@ -0,0 +1,148 @@ +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() + { + + } + +*/ + + + }