You are here

function FusionApplyUIPluginTestCase::testComment in Fusion Accelerator 7.2

Same name and namespace in other branches
  1. 7 fusion_apply/tests/fusion_apply_ui.test \FusionApplyUIPluginTestCase::testComment()

Tests comment plugin.

File

fusion_apply/tests/fusion_apply_ui.test, line 421
Tests for the Fusion Apply UI module.

Class

FusionApplyUIPluginTestCase
Tests UI functionality for Block plugin.

Code

function testComment() {

  // Create a node.
  $node1 = $this
    ->drupalCreateNode(array(
    'type' => 'article',
  ));

  // Go to node.
  $uri = entity_uri('node', $node1);
  $this
    ->drupalGet($uri['path']);

  // Add a comment to the node. With bartik the contextual links won't
  // display until there is at least one comment.
  $edit = array(
    'comment_body[und][0][value]' => $this
      ->randomString(128),
  );
  $this
    ->drupalPost(NULL, $edit, t('Save'));

  // Make sure our contextual link appears on the page.
  $this
    ->assertLinkByHref('admin/appearance/fusion/edit/nojs/comment/article/configure', 0, 'Contexual link to edit comment\'s skin configuration was found.');
}