class BoxTest

Same name and namespace in other branches
  1. 11.x core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTest.php \Drupal\Tests\block_content\Kernel\Plugin\migrate\source\d6\BoxTest

Tests D6 block boxes source plugin.

@covers \Drupal\block_content\Plugin\migrate\source\d6\Box
@group block_content

Hierarchy

Expanded class hierarchy of BoxTest

File

core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTest.php, line 13

Namespace

Drupal\Tests\block_content\Kernel\Plugin\migrate\source\d6
View source
class BoxTest extends MigrateSqlSourceTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected static $modules = [
    'block_content',
    'migrate_drupal',
  ];
  
  /**
   * {@inheritdoc}
   */
  public function providerSource() {
    $tests = [];
    $tests[0]['source_data']['boxes'] = [
      [
        'bid' => 1,
        'body' => '<p>I made some custom content.</p>',
        'info' => 'Static Block',
        'format' => 1,
      ],
      [
        'bid' => 2,
        'body' => '<p>I made some more custom content.</p>',
        'info' => 'Test Content',
        'format' => 1,
      ],
    ];
    // The expected results are identical to the source data.
    $tests[0]['expected_data'] = $tests[0]['source_data']['boxes'];
    return $tests;
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.