You are here

public function ColorTest::testLogoSettingOverride in Drupal 9

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

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

File

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

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
    ->drupalGet('admin/appearance/settings');
  $this
    ->submitForm($edit, 'Save configuration');

  // Ensure that the overridden logo is present in Bartik, which is colorable.
  $this
    ->drupalGet('admin/appearance/settings/bartik');
  $this
    ->assertSame($GLOBALS['base_path'] . 'core/misc/druplicon.png', $this
    ->getDrupalSettings()['color']['logo']);
}