You are here

function sweaverThemeSettings::sweaverDeleteStyle in Sweaver 7

Same name and namespace in other branches
  1. 6 tests/sweaver.themesettings.test \sweaverThemeSettings::sweaverDeleteStyle()

Delete a style.

Parameters

$scenario: The id of the scenario.

$configuration: A collection of configuration options.

$style_id: The id of the style to delete.

4 calls to sweaverThemeSettings::sweaverDeleteStyle()
sweaverThemeSettings::testScenarioA in tests/sweaver.themesettings.test
Scenario A.
sweaverThemeSettings::testScenarioB in tests/sweaver.themesettings.test
Scenario B.
sweaverThemeSettings::testScenarioC in tests/sweaver.themesettings.test
Scenario C.
sweaverThemeSettings::testScenarioD in tests/sweaver.themesettings.test
Scenario D.

File

tests/sweaver.themesettings.test, line 282
Advanced tests for sweaver editor + theme settings.

Class

sweaverThemeSettings
@file Advanced tests for sweaver editor + theme settings.

Code

function sweaverDeleteStyle($scenario, $configuration, $style_id) {
  $form_state['values']['delete_style'] = $style_id;
  $form_state['values']['var'] = 'theme_bartik_settings';
  $this
    ->performStyleAction('Delete style', $form_state, $configuration['form']);

  // Assert no entries are found in database.
  $css_draft = $this
    ->getCSS($style_id, FALSE);
  $css_live = $this
    ->getCSS($style_id, FALSE);
  $this
    ->assertFalse($css_draft, t('No draft css record found for style id ' . $style_id . ' in scenario ' . $scenario));
  $this
    ->assertFalse($css_live, t('No live css file found for style id ' . $style_id . ' in scenario ' . $scenario));

  // Assert draft & live are gone.
  $this
    ->assertCSSFiles($scenario, $style_id, FALSE, FALSE);
}