ConfigTest.php in Style Switcher 3.0.x
File
tests/src/Kernel/ConfigTest.php
View source
<?php
namespace Drupal\Tests\styleswitcher\Kernel;
use Drupal\KernelTests\KernelTestBase;
class ConfigTest extends KernelTestBase {
protected static $modules = [
'styleswitcher',
];
protected function setUp() {
parent::setUp();
$this
->installConfig(static::$modules);
}
public function testThemesUninstalled() {
$theme_installer = \Drupal::service('theme_installer');
$theme_installer
->install([
'styleswitcher_test_theme',
]);
$this
->config('styleswitcher.styles_settings')
->set('settings.styleswitcher_test_theme', [
'style' => [],
])
->save();
$theme_installer
->uninstall([
'styleswitcher_test_theme',
]);
$this
->assertArrayNotHasKey('styleswitcher_test_theme', $this
->config('styleswitcher.styles_settings')
->get('settings'));
}
}