BlockCustomTest.php 924 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Drupal\Tests\block_content\Kernel\Plugin\migrate\source\d7;
  3. use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
  4. /**
  5. * Tests d7_block_custom source plugin.
  6. *
  7. * @covers \Drupal\block_content\Plugin\migrate\source\d7\BlockCustom
  8. * @group block_content
  9. */
  10. class BlockCustomTest extends MigrateSqlSourceTestBase {
  11. /**
  12. * {@inheritdoc}
  13. */
  14. public static $modules = ['block_content', 'migrate_drupal'];
  15. /**
  16. * {@inheritdoc}
  17. */
  18. public function providerSource() {
  19. $tests = [];
  20. $tests[0]['source_data']['block_custom'] = [
  21. [
  22. 'bid' => '1',
  23. 'body' => "I don't feel creative enough to write anything clever here.",
  24. 'info' => 'Meh',
  25. 'format' => 'filtered_html',
  26. ],
  27. ];
  28. // The expected results are identical to the source data.
  29. $tests[0]['expected_data'] = $tests[0]['source_data']['block_custom'];
  30. return $tests;
  31. }
  32. }