Skip to content

Commit

Permalink
#165 - added a unit test for ArticleCommentView::editView() method
Browse files Browse the repository at this point in the history
  • Loading branch information
alphadevx committed Aug 15, 2015
1 parent 7255a9b commit 4967a98
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/Alpha/Test/View/ArticleCommentViewTest.php
Expand Up @@ -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');
}
}

?>

0 comments on commit 4967a98

Please sign in to comment.