You are here

function ContentTranslationSettingsApiTest::testSettingsApi in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/content_translation/src/Tests/ContentTranslationSettingsApiTest.php \Drupal\content_translation\Tests\ContentTranslationSettingsApiTest::testSettingsApi()

Tests that enabling translation via the API triggers schema updates.

File

core/modules/content_translation/src/Tests/ContentTranslationSettingsApiTest.php, line 37
Contains \Drupal\content_translation\Tests\ContentTranslationSettingsApiTest.

Class

ContentTranslationSettingsApiTest
Tests the content translation settings API.

Namespace

Drupal\content_translation\Tests

Code

function testSettingsApi() {
  $this->container
    ->get('content_translation.manager')
    ->setEnabled('entity_test_mul', 'entity_test_mul', TRUE);
  $result = db_field_exists('entity_test_mul_property_data', 'content_translation_source') && db_field_exists('entity_test_mul_property_data', 'content_translation_outdated');
  $this
    ->assertTrue($result, 'Schema updates correctly performed.');
}