Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / taxonomy / tests / src / Kernel / Plugin / migrate / source / d7 / TermSourceWithVocabularyFilterTest.php
1 <?php
2
3 namespace Drupal\Tests\taxonomy\Kernel\Plugin\migrate\source\d7;
4
5 /**
6  * Tests the taxonomy term source with vocabulary filter.
7  *
8  * @covers \Drupal\taxonomy\Plugin\migrate\source\d7\Term
9  * @group taxonomy
10  */
11 class TermSourceWithVocabularyFilterTest extends TermTest {
12
13   /**
14    * {@inheritdoc}
15    */
16   public static $modules = ['taxonomy', 'migrate_drupal'];
17
18   /**
19    * {@inheritdoc}
20    */
21   public function providerSource() {
22     // Get the source data from parent.
23     $tests = parent::providerSource();
24
25     // The expected results.
26     $tests[0]['expected_data'] = [
27       [
28         'tid' => 1,
29         'vid' => 5,
30         'name' => 'name value 1 (name_field)',
31         'description' => 'description value 1 (description_field)',
32         'weight' => 0,
33         'parent' => [0],
34       ],
35       [
36         'tid' => 4,
37         'vid' => 5,
38         'name' => 'name value 4 (name_field)',
39         'description' => 'description value 4 (description_field)',
40         'weight' => 1,
41         'parent' => [1],
42       ],
43     ];
44
45     // We know there are two rows with machine_name == 'tags'.
46     $tests[0]['expected_count'] = 2;
47
48     // Set up source plugin configuration.
49     $tests[0]['configuration'] = [
50       'bundle' => ['tags'],
51     ];
52
53     return $tests;
54   }
55
56 }