ContentTranslationSettingsApiTest.php in Drupal 8
File
core/modules/content_translation/tests/src/Kernel/ContentTranslationSettingsApiTest.php
View source
<?php
namespace Drupal\Tests\content_translation\Kernel;
use Drupal\Core\Database\Database;
use Drupal\KernelTests\KernelTestBase;
class ContentTranslationSettingsApiTest extends KernelTestBase {
public static $modules = [
'language',
'content_translation',
'user',
'entity_test',
];
protected function setUp() {
parent::setUp();
$this
->installEntitySchema('entity_test_mul');
}
public function testSettingsApi() {
$this->container
->get('content_translation.manager')
->setEnabled('entity_test_mul', 'entity_test_mul', TRUE);
$schema = Database::getConnection()
->schema();
$result = $schema
->fieldExists('entity_test_mul_property_data', 'content_translation_source') && $schema
->fieldExists('entity_test_mul_property_data', 'content_translation_outdated');
$this
->assertTrue($result, 'Schema updates correctly performed.');
}
}