You are here

public function FusionApplyDisplayTestCase::testFusionApplyDisplayed in Fusion Accelerator 7.2

Same name and namespace in other branches
  1. 7 fusion_apply/tests/fusion_apply.test \FusionApplyDisplayTestCase::testFusionApplyDisplayed()

File

fusion_apply/tests/fusion_apply.test, line 526
Tests for the Fusion Apply module.

Class

FusionApplyDisplayTestCase
Tests API functionality.

Code

public function testFusionApplyDisplayed() {

  // Save a skin configuration object.
  $skin = (object) array(
    'theme' => 'bartik',
    'module' => 'block',
    'element' => 'system__user-menu',
    'skin' => 'fusion_apply_test_font',
    'options' => array(
      'font_1',
    ),
    'status' => 1,
  );
  $this
    ->assertTrue(fusion_apply_skin_save($skin), 'Skin configuration object was saved.');
  $this
    ->verbose(print_r($skin, TRUE));

  // Go to the front page.
  $this
    ->drupalGet('');
  $this
    ->assertFusionApplyClass('block-system-user-menu', 'font-1', 'CSS class of configured skin option found.');
  $content = $this
    ->drupalGetContent();
  $css = drupal_get_path('module', 'fusion_apply_test') . '/fusion_apply_test.css';
  $this
    ->assertRaw($css, t('Stylesheet was included on page.'));
  $js = drupal_get_path('module', 'fusion_apply_test') . '/fusion_apply_test.js';
  $this
    ->assertRaw($js, t('Javascript was included on page.'));
}