public function OliveroTest::testConfigSchema in Drupal 9
Same name and namespace in other branches
- 10 core/tests/Drupal/FunctionalTests/Theme/OliveroTest.php \Drupal\FunctionalTests\Theme\OliveroTest::testConfigSchema()
Test Olivero's configuration schema.
File
- core/
tests/ Drupal/ FunctionalTests/ Theme/ OliveroTest.php, line 47
Class
- OliveroTest
- Tests the Olivero theme.
Namespace
Drupal\FunctionalTests\ThemeCode
public function testConfigSchema() {
// Required configuration.
$this
->drupalGet('');
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertSession()
->elementExists('css', '#block-olivero-content');
$this
->assertSession()
->elementNotExists('css', '#block-olivero-search-form-wide');
// Optional configuration.
\Drupal::service('module_installer')
->install([
'search',
'image',
'book',
'help',
'node',
]);
$this
->rebuildAll();
$this
->drupalLogin($this
->drupalCreateUser([
'search content',
]));
// Confirm search block was installed.
$this
->assertSession()
->elementExists('css', '#block-olivero-search-form-wide');
}