class Upgrade7Test
Same name in this branch
- 9 core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php \Drupal\Tests\migrate_drupal_ui\Functional\d7\Upgrade7Test
Same name and namespace in other branches
- 11.x core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php \Drupal\Tests\migrate_drupal_ui\Functional\d7\Upgrade7Test
Tests Drupal 7 upgrade using the migrate UI.
The test method is provided by the MigrateUpgradeTestBase class.
@group rdf @group legacy
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\FunctionalTests\AssertLegacyTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeTestBase uses \Drupal\migrate_drupal\MigrationConfigurationTrait implements \Drupal\Tests\BrowserTestBase
- class \Drupal\Tests\rdf\Functional\Migrate\Upgrade7Test implements \Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeTestBase
- class \Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeTestBase uses \Drupal\migrate_drupal\MigrationConfigurationTrait implements \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of Upgrade7Test
File
-
core/
modules/ rdf/ tests/ src/ Functional/ Migrate/ Upgrade7Test.php, line 15
Namespace
Drupal\Tests\rdf\Functional\MigrateView source
class Upgrade7Test extends MigrateUpgradeTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'rdf',
'migrate_drupal_ui',
];
/**
* The entity storage for node.
*
* @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $nodeStorage;
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this->loadFixture($this->getModulePath('rdf') . '/tests/fixtures/drupal7.php');
}
/**
* {@inheritdoc}
*/
protected function getSourceBasePath() {
return __DIR__;
}
/**
* {@inheritdoc}
*/
protected function getEntityCounts() {
return [
'action' => 21,
'base_field_override' => 2,
'block' => 31,
'block_content' => 0,
'block_content_type' => 1,
'comment' => 0,
'comment_type' => 5,
'contact_form' => 2,
'contact_message' => 0,
'date_format' => 12,
'editor' => 2,
'entity_form_display' => 11,
'entity_form_mode' => 1,
'entity_view_display' => 17,
'entity_view_mode' => 10,
'field_config' => 19,
'field_storage_config' => 12,
'file' => 0,
'filter_format' => 5,
'image_style' => 4,
'menu' => 5,
'menu_link_content' => 1,
'node' => 0,
'node_type' => 4,
'path_alias' => 0,
'rdf_mapping' => 8,
'search_page' => 2,
'shortcut' => 4,
'shortcut_set' => 1,
'taxonomy_term' => 1,
'taxonomy_vocabulary' => 2,
'tour' => 2,
'user' => 2,
'user_role' => 4,
'view' => 14,
];
}
/**
* {@inheritdoc}
*/
protected function getEntityCountsIncremental() {
return [];
}
/**
* {@inheritdoc}
*/
protected function getAvailablePaths() {
return [
'Block',
'Blog',
'Comment',
'Contextual links',
'Dashboard',
'Database logging',
'Field',
'Field SQL storage',
'Field UI',
'File',
'Filter',
'Help',
'Image',
'List',
'Menu',
'Node',
'Number',
'Options',
'Overlay',
'Path',
'RDF',
'Search',
'Shortcut',
'System',
'Taxonomy',
'Text',
'Toolbar',
'User',
];
}
/**
* {@inheritdoc}
*/
protected function getMissingPaths() {
return [
'Color',
'Forum',
];
}
/**
* Executes all steps of migrations upgrade.
*/
public function testUpgrade() {
// Start the upgrade process.
$this->submitCredentialForm();
$session = $this->assertSession();
$this->submitForm([], 'I acknowledge I may lose data. Continue anyway.');
$session->statusCodeEquals(200);
// Test the review form.
$this->assertReviewForm();
$this->submitForm([], 'Perform upgrade');
$this->assertUpgrade($this->getEntityCounts());
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.