function ColorTest::testLogoSettingOverride

Same name and namespace in other branches
  1. 9 core/modules/color/tests/src/Functional/ColorTest.php \Drupal\Tests\color\Functional\ColorTest::testLogoSettingOverride()

Test whether the custom logo is used in the color preview.

File

core/modules/color/tests/src/Functional/ColorTest.php, line 185

Class

ColorTest
Modify the Bartik theme colors and make sure the changes are reflected on the frontend.

Namespace

Drupal\Tests\color\Functional

Code

public function testLogoSettingOverride() {
  $this->drupalLogin($this->bigUser);
  $edit = [
    'default_logo' => FALSE,
    'logo_path' => 'core/misc/druplicon.png',
  ];
  $this->drupalPostForm('admin/appearance/settings', $edit, t('Save configuration'));
  // Ensure that the overridden logo is present in Bartik, which is colorable.
  $this->drupalGet('admin/appearance/settings/bartik');
  $this->assertIdentical($GLOBALS['base_path'] . 'core/misc/druplicon.png', $this->getDrupalSettings()['color']['logo']);
}

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