function NodeTranslationUITest::doUninstallTest
Tests uninstalling content_translation.
1 call to NodeTranslationUITest::doUninstallTest()
- NodeTranslationUITest::testTranslationUI in core/modules/ node/ tests/ src/ Functional/ NodeTranslationUITest.php 
- Tests the basic translation UI.
File
- 
              core/modules/ node/ tests/ src/ Functional/ NodeTranslationUITest.php, line 471 
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.');
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
