ColorConfigSchemaTest.php in Drupal 9
File
core/modules/color/tests/src/Functional/ColorConfigSchemaTest.php
View source
<?php
namespace Drupal\Tests\color\Functional;
use Drupal\Tests\BrowserTestBase;
class ColorConfigSchemaTest extends BrowserTestBase {
protected static $modules = [
'color',
];
protected $defaultTheme = 'stark';
protected $adminUser;
protected function setUp() : void {
parent::setUp();
\Drupal::service('theme_installer')
->install([
'bartik',
]);
$this->adminUser = $this
->drupalCreateUser([
'administer themes',
]);
$this
->drupalLogin($this->adminUser);
}
public function testValidColorConfigSchema() {
$settings_path = 'admin/appearance/settings/bartik';
$edit['scheme'] = '';
$edit['palette[bg]'] = '#123456';
$this
->drupalGet($settings_path);
$this
->submitForm($edit, 'Save configuration');
}
}