3 namespace Drupal\Tests\content_translation\Kernel;
5 use Drupal\KernelTests\KernelTestBase;
8 * Tests the content translation settings API.
10 * @group content_translation
12 class ContentTranslationSettingsApiTest extends KernelTestBase {
19 public static $modules = ['language', 'content_translation', 'user', 'entity_test'];
24 protected function setUp() {
26 $this->installEntitySchema('entity_test_mul');
30 * Tests that enabling translation via the API triggers schema updates.
32 public function testSettingsApi() {
33 $this->container->get('content_translation.manager')->setEnabled('entity_test_mul', 'entity_test_mul', TRUE);
35 db_field_exists('entity_test_mul_property_data', 'content_translation_source') &&
36 db_field_exists('entity_test_mul_property_data', 'content_translation_outdated');
37 $this->assertTrue($result, 'Schema updates correctly performed.');