function VocabularyTest::providerSource

Same name in this branch
  1. main core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTest.php \Drupal\Tests\taxonomy\Kernel\Plugin\migrate\source\d6\VocabularyTest::providerSource()
Same name and namespace in other branches
  1. 11.x core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTest.php \Drupal\Tests\taxonomy\Kernel\Plugin\migrate\source\d6\VocabularyTest::providerSource()
  2. 11.x core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTest.php \Drupal\Tests\taxonomy\Kernel\Plugin\migrate\source\d7\VocabularyTest::providerSource()
  3. 10 core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTest.php \Drupal\Tests\taxonomy\Kernel\Plugin\migrate\source\d6\VocabularyTest::providerSource()
  4. 10 core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTest.php \Drupal\Tests\taxonomy\Kernel\Plugin\migrate\source\d7\VocabularyTest::providerSource()
  5. 9 core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTest.php \Drupal\Tests\taxonomy\Kernel\Plugin\migrate\source\d6\VocabularyTest::providerSource()
  6. 9 core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTest.php \Drupal\Tests\taxonomy\Kernel\Plugin\migrate\source\d7\VocabularyTest::providerSource()
  7. 8.9.x core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTest.php \Drupal\Tests\taxonomy\Kernel\Plugin\migrate\source\d6\VocabularyTest::providerSource()
  8. 8.9.x core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTest.php \Drupal\Tests\taxonomy\Kernel\Plugin\migrate\source\d7\VocabularyTest::providerSource()

Provides source data for ::testSource.

Return value

iterable The source data.

Overrides MigrateSourceTestBase::providerSource

1 call to VocabularyTest::providerSource()
LanguageContentTaxonomyVocabularySettingsTest::providerSource in core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentTaxonomyVocabularySettingsTest.php
Provides source data for ::testSource.
1 method overrides VocabularyTest::providerSource()
LanguageContentTaxonomyVocabularySettingsTest::providerSource in core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentTaxonomyVocabularySettingsTest.php
Provides source data for ::testSource.

File

core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTest.php, line 29

Class

VocabularyTest
Tests D7 vocabulary source plugin.

Namespace

Drupal\Tests\taxonomy\Kernel\Plugin\migrate\source\d7

Code

public static function providerSource() {
  $tests = [];
  // The source data.
  $tests[0]['source_data']['taxonomy_vocabulary'] = [
    [
      'vid' => 1,
      'name' => 'Tags',
      'description' => 'Tags description.',
      'hierarchy' => 0,
      'module' => 'taxonomy',
      'weight' => 0,
      'machine_name' => 'tags',
    ],
    [
      'vid' => 2,
      'name' => 'Categories',
      'description' => 'Categories description.',
      'hierarchy' => 1,
      'module' => 'taxonomy',
      'weight' => 0,
      'machine_name' => 'categories',
    ],
  ];
  // The expected results.
  $tests[0]['expected_data'] = $tests[0]['source_data']['taxonomy_vocabulary'];
  return $tests;
}

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