3 namespace Drupal\Tests\filter\Kernel\Plugin\migrate\source\d7;
5 use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
8 * Tests D7 filter format source plugin.
10 * @covers \Drupal\filter\Plugin\migrate\source\d7\FilterFormat
14 class FilterFormatTest extends MigrateSqlSourceTestBase {
19 public static $modules = ['filter', 'migrate_drupal'];
24 public function providerSource() {
28 $tests[0]['source_data']['filter_format'] = [
30 'format' => 'custom_text_format',
31 'name' => 'Custom Text format',
37 'format' => 'full_html',
38 'name' => 'Full HTML',
44 $tests[0]['source_data']['filter'] = [
46 'format' => 'custom_text_format',
48 'name' => 'filter_autop',
51 'settings' => serialize([]),
54 'format' => 'custom_text_format',
56 'name' => 'filter_html',
59 'settings' => serialize([]),
62 'format' => 'full_html',
64 'name' => 'filter_url',
67 'settings' => serialize([]),
71 // The expected results.
72 $tests[0]['expected_data'] = [
74 'format' => 'custom_text_format',
75 'name' => 'Custom Text format',
81 'format' => 'custom_text_format',
83 'name' => 'filter_autop',
89 'format' => 'custom_text_format',
91 'name' => 'filter_html',
99 'format' => 'full_html',
100 'name' => 'Full HTML',
106 'format' => 'full_html',
107 'module' => 'filter',
108 'name' => 'filter_url',