public function UninstallKernelTest::testUninstallMedia in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/src/Kernel/Installer/UninstallKernelTest.php \Drupal\Tests\system\Kernel\Installer\UninstallKernelTest::testUninstallMedia()
Tests uninstalling media and file modules.
File
- core/
modules/ system/ tests/ src/ Kernel/ Installer/ UninstallKernelTest.php, line 43
Class
- UninstallKernelTest
- Tests the uninstallation of modules.
Namespace
Drupal\Tests\system\Kernel\InstallerCode
public function testUninstallMedia() {
// Media creates a file field that is removed on uninstall, ensure that it
// is fully deleted (as it is empty) and that file then can be uninstalled
// as well.
\Drupal::service('module_installer')
->uninstall([
'media',
]);
\Drupal::service('module_installer')
->uninstall([
'file',
]);
}