From 4967a980fe4334145c7a808e9a797c41615c53c3 Mon Sep 17 00:00:00 2001 From: alphadevx Date: Sat, 15 Aug 2015 15:56:01 +0100 Subject: [PATCH] #165 - added a unit test for ArticleCommentView::editView() method --- test/Alpha/Test/View/ArticleCommentViewTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/Alpha/Test/View/ArticleCommentViewTest.php b/test/Alpha/Test/View/ArticleCommentViewTest.php index f45e0180..af55097b 100644 --- a/test/Alpha/Test/View/ArticleCommentViewTest.php +++ b/test/Alpha/Test/View/ArticleCommentViewTest.php @@ -117,6 +117,22 @@ public function testCreateView() $this->assertNotEmpty($view->createView(array('formAction' => '/')), 'Testing the createView() method'); $this->assertTrue(strpos($view->createView(array('formAction' => '/')),'Post Comment') !== false, 'Testing the createView() method'); } + + /** + * Testing the editView() method + * + * @since 2.0 + */ + public function testEditView() + { + $articleComment = new ArticleComment(); + $articleComment->set('content', 'test comment'); + $articleComment->save(); + $view = View::getInstance($articleComment); + + $this->assertNotEmpty($view->editView(array('formAction' => '/')), 'Testing the editView() method'); + $this->assertTrue(strpos($view->editView(array('formAction' => '/')),'Update Your Comment') !== false, 'Testing the editView() method'); + } } ?> \ No newline at end of file