function ThemeTest::testThemeSettingsNoLogoNoFavicon

Same name and namespace in other branches
  1. 9 core/modules/system/tests/src/Functional/System/ThemeTest.php \Drupal\Tests\system\Functional\System\ThemeTest::testThemeSettingsNoLogoNoFavicon()
  2. 10 core/modules/system/tests/src/Functional/System/ThemeTest.php \Drupal\Tests\system\Functional\System\ThemeTest::testThemeSettingsNoLogoNoFavicon()
  3. 11.x core/modules/system/tests/src/Functional/System/ThemeTest.php \Drupal\Tests\system\Functional\System\ThemeTest::testThemeSettingsNoLogoNoFavicon()

Test the theme settings form when logo and favicon features are disabled.

File

core/modules/system/tests/src/Functional/System/ThemeTest.php, line 485

Class

ThemeTest
Tests the theme interface functionality by enabling and switching themes, and using an administration theme.

Namespace

Drupal\Tests\system\Functional\System

Code

public function testThemeSettingsNoLogoNoFavicon() {
    // Install theme with no logo and no favicon feature.
    $this->container
        ->get('theme_installer')
        ->install([
        'test_theme_settings_features',
    ]);
    // Visit this theme's settings page.
    $this->drupalGet('admin/appearance/settings/test_theme_settings_features');
    $edit = [];
    $this->drupalPostForm('admin/appearance/settings/test_theme_settings_features', $edit, t('Save configuration'));
    $this->assertText('The configuration options have been saved.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.