function UninstallKernelTest::testUninstallMedia
Same name in other branches
- 9 core/modules/system/tests/src/Kernel/Installer/UninstallKernelTest.php \Drupal\Tests\system\Kernel\Installer\UninstallKernelTest::testUninstallMedia()
- 8.9.x core/modules/system/tests/src/Kernel/Installer/UninstallKernelTest.php \Drupal\Tests\system\Kernel\Installer\UninstallKernelTest::testUninstallMedia()
- 11.x 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 44
Class
- UninstallKernelTest
- Tests the uninstallation of modules.
Namespace
Drupal\Tests\system\Kernel\InstallerCode
public function testUninstallMedia() : void {
// 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',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.