VariableTranslationCheckRequirementsTest.php in Drupal 9
File
core/modules/migrate_drupal/tests/src/Kernel/d6/VariableTranslationCheckRequirementsTest.php
View source
<?php
namespace Drupal\Tests\migrate_drupal\Kernel\d6;
use Drupal\migrate\Exception\RequirementsException;
class VariableTranslationCheckRequirementsTest extends MigrateDrupal6TestBase {
protected static $modules = [
'config_translation',
];
public function setUp() : void {
parent::setUp();
$this->sourceDatabase
->schema()
->dropTable('i18n_variable');
}
public function testCheckRequirements() {
$this
->expectException(RequirementsException::class);
$this
->expectExceptionMessage("Source database table 'i18n_variable' does not exist");
$this
->getMigration('d6_system_maintenance_translation')
->getSourcePlugin()
->checkRequirements();
}
}