You are here

function PanelsEverywhereSettingsTestCase::testPerThemeOption in Panels Everywhere 7

Ensure that the option for enabling PE for different themes works.

File

tests/PanelsEverywhereSettingsTestCase.test, line 63
Tests for the Panels Everywhere module's different settings.

Class

PanelsEverywhereSettingsTestCase
@file Tests for the Panels Everywhere module's different settings.

Code

function testPerThemeOption() {

  // Enable PE and limit it to just the Bartik theme.
  variable_set('panels_everywhere_site_template_enabled', TRUE);
  variable_set('panels_everywhere_provide_sample', TRUE);
  variable_set('panels_everywhere_site_template_per_theme', TRUE);

  // Enable Bartik, disable Seven.
  variable_set('panels_everywhere_override_theme_bartik', TRUE);
  variable_set('panels_everywhere_override_theme_seven', FALSE);

  // Clear the caches so that the default display kicks in.
  drupal_flush_all_caches();

  // @todo Confirm that the Bartik theme is PE-enabled.
  $this
    ->checkBartikThemeEnabled();

  // @todo Confirm that the Seven theme is not PE-enabled.
  $this
    ->checkSevenThemeDisabled();

  // Disable Bartik, enable Seven.
  variable_set('panels_everywhere_override_theme_bartik', FALSE);
  variable_set('panels_everywhere_override_theme_seven', TRUE);

  // Clear the caches so that the default display kicks in.
  drupal_flush_all_caches();

  // @todo Confirm that the Bartik theme is not PE-enabled.
  $this
    ->checkBartikThemeDisabled();

  // @todo Confirm that the Seven theme is PE-enabled.
  $this
    ->checkSevenThemeEnabled();
}