public function TmgmtExtensionSuitTestBase::setUp in TMGMT Extension Suite 8.3
Same name and namespace in other branches
- 8.2 tests/src/Functional/TmgmtExtensionSuitTestBase.php \Drupal\Tests\tmgmt_extension_suit\Functional\TmgmtExtensionSuitTestBase::setUp()
Overrides DrupalWebTestCase::setUp()
Overrides TMGMTTestBase::setUp
File
- tests/
src/ Functional/ TmgmtExtensionSuitTestBase.php, line 44
Class
- TmgmtExtensionSuitTestBase
- Basic class for tmgmt extension module.
Namespace
Drupal\Tests\tmgmt_extension_suit\FunctionalCode
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) {
}
}