class MigrateUiParagraphsTest

Tests the migration of paragraph entities.

@group paragraphs

@group legacy

Hierarchy

Expanded class hierarchy of MigrateUiParagraphsTest

File

paragraphs/tests/src/Functional/Migrate/MigrateUiParagraphsTest.php, line 14

Namespace

Drupal\Tests\paragraphs\Functional\Migrate
View source
class MigrateUiParagraphsTest extends MigrateUiParagraphsTestBase {
  use ParagraphsNodeMigrationAssertionsTrait;

  /**
   * Tests the result of the paragraphs migration.
   *
   * @dataProvider providerParagraphsMigrate
   */
  public function testParagraphsMigrate($node_migrate_type_classic) {
    $this
      ->setClassicNodeMigration($node_migrate_type_classic);
    $this
      ->assertMigrateUpgradeViaUi();
    $this
      ->assertParagraphsMigrationResults();
    $this
      ->assertNode8Paragraphs();
    $this
      ->assertNode9Paragraphs();
    $this
      ->assertIcelandicNode9Paragraphs();
  }

  /**
   * Provides data and expected results for testing paragraph migrations.
   *
   * @return bool[][]
   *   Classic node migration type.
   */
  public function providerParagraphsMigrate() {
    return [
      [
        'node_migrate_type_classic' => TRUE,
      ],
      [
        'node_migrate_type_classic' => FALSE,
      ],
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MigrateUiParagraphsTest::providerParagraphsMigrate public function Provides data and expected results for testing paragraph migrations.
MigrateUiParagraphsTest::testParagraphsMigrate public function Tests the result of the paragraphs migration.
MigrateUiParagraphsTestBase::$modules protected static property
MigrateUiParagraphsTestBase::assertEntities protected function Asserts that the expected entities exist.
MigrateUiParagraphsTestBase::assertMigrateUpgradeViaUi protected function Executes the upgrade process by the UI and asserts basic expectations.
MigrateUiParagraphsTestBase::assertPageTitle protected function Pass if the page HTML title is the given string.
MigrateUiParagraphsTestBase::assertParagraphsMigrationResults protected function Checks that migrations have been performed successfully.
MigrateUiParagraphsTestBase::getAvailablePaths protected function
MigrateUiParagraphsTestBase::getEntityCounts protected function
MigrateUiParagraphsTestBase::getEntityCountsIncremental protected function
MigrateUiParagraphsTestBase::getEntityStorage protected function Returns the specified entity's storage when the entity definition exists.
MigrateUiParagraphsTestBase::getExpectedEntities protected function Gets the expected entity IDs and labels per entity type after migration.
MigrateUiParagraphsTestBase::getMissingPaths protected function
MigrateUiParagraphsTestBase::getSourceBasePath protected function
MigrateUiParagraphsTestBase::getSourcePrivateFilesPath protected function
MigrateUiParagraphsTestBase::setClassicNodeMigration protected function Sets the type of the node migration.
MigrateUiParagraphsTestBase::setUp protected function
ParagraphsNodeMigrationAssertionsTrait::assertIcelandicNode9Paragraphs protected function Assertions of the Icelandic translation of node 9.
ParagraphsNodeMigrationAssertionsTrait::assertNode8Paragraphs protected function Assertions on node 8.
ParagraphsNodeMigrationAssertionsTrait::assertNode9Paragraphs protected function Assertions of node 9.
ParagraphsNodeMigrationAssertionsTrait::getReferencedEntities protected function Get the referred entities.