Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / taxonomy / tests / src / Kernel / Plugin / migrate / source / d7 / VocabularyTest.php
1 <?php
2
3 namespace Drupal\Tests\taxonomy\Kernel\Plugin\migrate\source\d7;
4
5 use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
6
7 /**
8  * Tests D7 vocabulary source plugin.
9  *
10  * @covers \Drupal\taxonomy\Plugin\migrate\source\d7\Vocabulary
11  * @group taxonomy
12  */
13 class VocabularyTest extends MigrateSqlSourceTestBase {
14
15   /**
16    * {@inheritdoc}
17    */
18   public static $modules = ['taxonomy', 'migrate_drupal'];
19
20   /**
21    * {@inheritdoc}
22    */
23   public function providerSource() {
24     $tests = [];
25
26     // The source data.
27     $tests[0]['source_data']['taxonomy_vocabulary'] = [
28       [
29         'vid' => 1,
30         'name' => 'Tags',
31         'description' => 'Tags description.',
32         'hierarchy' => 0,
33         'module' => 'taxonomy',
34         'weight' => 0,
35         'machine_name' => 'tags',
36       ],
37       [
38         'vid' => 2,
39         'name' => 'Categories',
40         'description' => 'Categories description.',
41         'hierarchy' => 1,
42         'module' => 'taxonomy',
43         'weight' => 0,
44         'machine_name' => 'categories',
45       ],
46     ];
47
48     // The expected results.
49     $tests[0]['expected_data'] = $tests[0]['source_data']['taxonomy_vocabulary'];
50
51     return $tests;
52   }
53
54 }