SourceProviderTest.php in Drupal 9
File
core/modules/migrate_drupal_ui/tests/src/Functional/SourceProviderTest.php
View source
<?php
namespace Drupal\Tests\migrate_drupal_ui\Functional;
class SourceProviderTest extends MigrateUpgradeTestBase {
protected static $modules = [
'migrate_drupal_ui',
'migration_provider_test',
];
public function testSourceProvider($path_to_database) {
$this
->loadFixture($this
->getModulePath('migrate_drupal') . $path_to_database);
$session = $this
->assertSession();
$this
->submitCredentialForm();
$session
->pageTextContains(t('Resolve all issues below to continue the upgrade.'));
$session
->pageTextContains(t('The no_source_module plugin must define the source_module property.'));
$this->container
->get('module_installer')
->uninstall([
'migration_provider_test',
], TRUE);
$this
->drupalGet('/upgrade');
$this
->submitForm([], 'Continue');
$this
->submitForm($this->edits, 'Review upgrade');
$session
->pageTextNotContains(t('Source module not found for migration_provider_no_annotation.'));
$session
->pageTextNotContains(t('Source module not found for migration_provider_test.'));
$session
->pageTextNotContains(t('module not found'));
}
public function providerSourceProvider() {
return [
[
'path_to_database' => '/tests/fixtures/drupal6.php',
],
[
'path_to_database' => '/tests/fixtures/drupal7.php',
],
];
}
protected function getSourceBasePath() {
return '';
}
protected function getAvailablePaths() {
return [];
}
protected function getEntityCounts() {
return [];
}
protected function getEntityCountsIncremental() {
return [];
}
protected function getMissingPaths() {
return [];
}
}