function AdminTest::testAccentColorSetting

Same name and namespace in other branches
  1. main core/themes/admin/tests/src/Functional/AdminTest.php \Drupal\Tests\admin\Functional\AdminTest::testAccentColorSetting()

Tests color accent setting.

File

core/themes/admin/tests/src/Functional/AdminTest.php, line 82

Class

AdminTest
Tests the Admin theme.

Namespace

Drupal\Tests\admin\Functional

Code

public function testAccentColorSetting() : void {
  \Drupal::configFactory()->getEditable('admin.settings')
    ->set('preset_accent_color', 'red')
    ->save();
  $response = $this->drupalGet('/admin/content');
  $this->assertSession()
    ->statusCodeEquals(200);
  $this->assertStringContainsString('"preset_accent_color":"red"', $response);
}

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