protected function NodeTranslationUITest::doUninstallTest in Drupal 10
Same name and namespace in other branches
- 8 core/modules/node/tests/src/Functional/NodeTranslationUITest.php \Drupal\Tests\node\Functional\NodeTranslationUITest::doUninstallTest()
- 9 core/modules/node/tests/src/Functional/NodeTranslationUITest.php \Drupal\Tests\node\Functional\NodeTranslationUITest::doUninstallTest()
Tests uninstalling content_translation.
File
- core/
modules/ node/ tests/ src/ Functional/ NodeTranslationUITest.php, line 468
Class
- NodeTranslationUITest
- Tests the Node Translation UI.
Namespace
Drupal\Tests\node\FunctionalCode
protected function doUninstallTest() {
// Delete all the nodes so there is no data.
$nodes = Node::loadMultiple();
foreach ($nodes as $node) {
$node
->delete();
}
$language_count = count(\Drupal::configFactory()
->listAll('language.content_settings.'));
\Drupal::service('module_installer')
->uninstall([
'content_translation',
]);
$this
->rebuildContainer();
$this
->assertCount($language_count, \Drupal::configFactory()
->listAll('language.content_settings.'), 'Languages have been fixed rather than deleted during content_translation uninstall.');
}