public function FieldInstanceOptionTranslationTest::providerSource in Drupal 8
Same name and namespace in other branches
- 9 core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceOptionTranslationTest.php \Drupal\Tests\field\Kernel\Plugin\migrate\source\d6\FieldInstanceOptionTranslationTest::providerSource()
The data provider.
Return value
array Array of data sets to test, each of which is a numerically indexed array with the following elements:
- An array of source data, which can be optionally processed and set up by subclasses.
- An array of expected result rows.
- (optional) The number of result rows the plugin under test is expected to return. If this is not a numeric value, the plugin will not be counted.
- (optional) Array of configuration options for the plugin under test.
Overrides FieldOptionTranslationTest::providerSource
See also
\Drupal\Tests\migrate\Kernel\MigrateSourceTestBase::testSource
File
- core/
modules/ field/ tests/ src/ Kernel/ Plugin/ migrate/ source/ d6/ FieldInstanceOptionTranslationTest.php, line 21
Class
- FieldInstanceOptionTranslationTest
- Tests the field instance option translation source plugin.
Namespace
Drupal\Tests\field\Kernel\Plugin\migrate\source\d6Code
public function providerSource() {
$test = parent::providerSource();
// FieldInstanceOptionTranslation extends FieldOptionTranslation so the
// same test can be used with the addition of the 'type' field to the
// output.
$test[0]['expected_results'][0]['type'] = 'text';
$test[0]['expected_results'][1]['type'] = 'text';
$test[0]['expected_results'][2]['type'] = 'number_integer';
$test[0]['expected_results'][3]['type'] = 'number_integer';
return $test;
}