function AdminTest::testDarkModeSetting
Same name and namespace in other branches
- main core/themes/admin/tests/src/Functional/AdminTest.php \Drupal\Tests\admin\Functional\AdminTest::testDarkModeSetting()
Tests the dark mode setting.
File
-
core/
themes/ admin/ tests/ src/ Functional/ AdminTest.php, line 72
Class
- AdminTest
- Tests the Admin theme.
Namespace
Drupal\Tests\admin\FunctionalCode
public function testDarkModeSetting() : void {
\Drupal::configFactory()->getEditable('admin.settings')
->set('enable_dark_mode', '1')
->save();
$response = $this->drupalGet('/admin/content');
$this->assertSession()
->statusCodeEquals(200);
$this->assertStringContainsString('"dark_mode":"1"', $response);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.