class ParagraphsItemRevisionSourceTest

Test the paragraphs_item_revision source plugin.

@covers \Drupal\paragraphs\Plugin\migrate\source\d7\ParagraphsItemRevision @group paragraphs

Hierarchy

Expanded class hierarchy of ParagraphsItemRevisionSourceTest

File

paragraphs/tests/src/Kernel/migrate/ParagraphsItemRevisionSourceTest.php, line 14

Namespace

Drupal\Tests\paragraphs\Kernel\migrate
View source
class ParagraphsItemRevisionSourceTest extends MigrateSqlSourceTestBase {
  use ParagraphsSourceData;

  /**
   * {@inheritdoc}
   */
  protected static $modules = [
    'migrate_drupal',
    'paragraphs',
  ];

  /**
   * {@inheritdoc}
   */
  public function providerSource() {
    $data = $this
      ->getSourceData();
    $data[0]['expected_results'] = [
      [
        'item_id' => '2',
        'revision_id' => '2',
        'field_name' => 'field_paragraphs_field',
        'bundle' => 'paragraphs_field',
        'archived' => '0',
        'parent_id' => '42',
        'parent_type' => 'taxonomy_term',
        'field_text' => [
          0 => [
            'value' => 'PID2R2 text',
          ],
        ],
      ],
    ];
    return $data;
  }

}

Members

Name Modifiers Type Description Overridessort ascending
ParagraphsItemRevisionSourceTest::providerSource public function
ParagraphsSourceData::getSourceData protected function Provides a source data array for the source tests.
ParagraphsItemRevisionSourceTest::$modules protected static property