class MigrateNoMigrateDrupalTest
Same name and namespace in other branches
- 11.x core/modules/migrate/tests/src/Functional/MigrateNoMigrateDrupalTest.php \Drupal\Tests\migrate\Functional\MigrateNoMigrateDrupalTest
- 10 core/modules/migrate/tests/src/Functional/MigrateNoMigrateDrupalTest.php \Drupal\Tests\migrate\Functional\MigrateNoMigrateDrupalTest
- 8.9.x core/modules/migrate/tests/src/Functional/MigrateNoMigrateDrupalTest.php \Drupal\Tests\migrate\Functional\MigrateNoMigrateDrupalTest
Execute migration.
This is intentionally a Functional test instead of a Kernel test because Kernel tests have proven to not catch all edge cases that are encountered via a Functional test.
@group migrate
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 extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\migrate\Functional\MigrateNoMigrateDrupalTest uses \Drupal\Tests\node\Traits\ContentTypeCreationTrait extends \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of MigrateNoMigrateDrupalTest
File
-
core/
modules/ migrate/ tests/ src/ Functional/ MigrateNoMigrateDrupalTest.php, line 18
Namespace
Drupal\Tests\migrate\FunctionalView source
class MigrateNoMigrateDrupalTest extends BrowserTestBase {
use ContentTypeCreationTrait;
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected static $modules = [
'migrate',
'migrate_no_migrate_drupal_test',
'node',
];
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this->createContentType([
'type' => 'no_migrate_drupal',
]);
}
/**
* Tests execution of a migration.
*/
public function testExecutionNoMigrateDrupal() {
$this->drupalGet('/migrate_no_migrate_drupal_test/execute');
$this->assertSession()
->pageTextContains('Migration was successful.');
$node_1 = Node::load(1);
$node_2 = Node::load(2);
$this->assertEquals('Node 1', $node_1->label());
$this->assertEquals('Node 2', $node_2->label());
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.