class ShortcutClaroIntegrationTest
Same name and namespace in other branches
- 11.x core/modules/shortcut/tests/src/Kernel/ShortcutClaroIntegrationTest.php \Drupal\Tests\shortcut\Kernel\ShortcutClaroIntegrationTest
- 10 core/modules/shortcut/tests/src/Kernel/ShortcutClaroIntegrationTest.php \Drupal\Tests\shortcut\Kernel\ShortcutClaroIntegrationTest
Tests shortcut_install() and shortcut_uninstall().
@group shortcut
Hierarchy
- class \Drupal\KernelTests\KernelTestBase implements \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\shortcut\Kernel\ShortcutClaroIntegrationTest extends \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of ShortcutClaroIntegrationTest
File
-
core/
modules/ shortcut/ tests/ src/ Kernel/ ShortcutClaroIntegrationTest.php, line 12
Namespace
Drupal\Tests\shortcut\KernelView source
class ShortcutClaroIntegrationTest extends KernelTestBase {
protected static $modules = [
'system',
];
/**
* Tests shortcut_install() and shortcut_uninstall().
*/
public function testInstallUninstall() {
// Install claro.
\Drupal::service('theme_installer')->install([
'claro',
]);
$this->assertNull($this->config('claro.settings')
->get('third_party_settings.shortcut'), 'There are no shortcut settings in claro.settings.');
\Drupal::service('module_installer')->install([
'shortcut',
]);
$this->assertTrue($this->config('claro.settings')
->get('third_party_settings.shortcut.module_link'), 'The shortcut module_link setting is in claro.settings.');
\Drupal::service('module_installer')->uninstall([
'shortcut',
]);
$this->assertNull($this->config('claro.settings')
->get('third_party_settings.shortcut'), 'There are no shortcut settings in claro.settings.');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.