You are here

function FusionApplyUIPluginTestCase::testBlock in Fusion Accelerator 7.2

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

Tests block plugin.

File

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

Class

FusionApplyUIPluginTestCase
Tests UI functionality for Block plugin.

Code

function testBlock() {

  // Enable user menu block for the first sidebar.
  // @see http://drupal.org/node/913086
  $default_theme = variable_get('theme_default', 'bartik');
  db_merge('block')
    ->key(array(
    'theme' => $default_theme,
    'module' => 'system',
    'delta' => 'user-menu',
  ))
    ->fields(array(
    'status' => 1,
    'region' => 'sidebar_first',
    'pages' => '',
  ))
    ->execute();

  // Get front page.
  $this
    ->drupalGet('');

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