public function TmgmtExtensionSuitTestBase::setUp in TMGMT Extension Suite 8
Overrides DrupalWebTestCase::setUp()
Overrides TMGMTTestBase::setUp
File
- src/
Tests/ TmgmtExtensionSuitTestBase.php, line 38
Class
- TmgmtExtensionSuitTestBase
- Basic class for tmgmt extension module.
Namespace
Drupal\tmgmt_extension_suit\TestsCode
public function setUp() {
parent::setUp();
$this->userForTranslations = $this
->loginAsAdmin([
'edit any translatable_node content',
]);
// Create queue table (it doesn't exist for simpletests somehow).
$uploadQueue = new DatabaseQueue('tmgmt_extension_suit_upload', Database::getConnection());
$database_schema = Drupal::database()
->schema();
try {
if (!$database_schema
->tableExists('queue')) {
$schema_definition = $uploadQueue
->schemaDefinition();
$database_schema
->createTable('queue', $schema_definition);
}
} catch (SchemaObjectExistsException $e) {
}
// Apply new column into tmgmt_job table.
Drupal::service('entity.definition_update_manager')
->applyUpdates();
}