Issue #3437129 by mikelutz: Remove Drupal\Tests\migrate\Kernel\MigrateSourceTestBase::providerSource()
parent
f2f91eb17a
commit
fb9591f0cc
|
@ -1131,6 +1131,16 @@ $ignoreErrors[] = [
|
|||
'count' => 1,
|
||||
'path' => __DIR__ . '/modules/migrate/src/Plugin/migrate/destination/NullDestination.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
'message' => '#^@dataProvider providerSource related method not found\\.$#',
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
'message' => '#^@dataProvider providerSource related method not found\\.$#',
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/modules/migrate/tests/src/Kernel/MigrateSqlSourceTestBase.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
'message' => '#^Call to an undefined static method Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrateTestBase\\:\\:migrateDumpAlter\\(\\)\\.$#',
|
||||
'count' => 1,
|
||||
|
|
|
@ -9,6 +9,29 @@ use Drupal\migrate\Row;
|
|||
|
||||
/**
|
||||
* Base class for tests of Migrate source plugins.
|
||||
*
|
||||
* Implementing classes must declare a providerSource() method for this class
|
||||
* to work, defined as follows:
|
||||
*
|
||||
* @code
|
||||
* abstract public static function providerSource(): array;
|
||||
* @endcode
|
||||
*
|
||||
* The returned array should be as follows:
|
||||
*
|
||||
* @code
|
||||
* 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.
|
||||
* @endcode
|
||||
*
|
||||
* @see \Drupal\Tests\migrate\Kernel\MigrateSourceTestBase::testSource
|
||||
*/
|
||||
abstract class MigrateSourceTestBase extends KernelTestBase {
|
||||
|
||||
|
@ -31,24 +54,6 @@ abstract class MigrateSourceTestBase extends KernelTestBase {
|
|||
*/
|
||||
protected $plugin;
|
||||
|
||||
/**
|
||||
* The data provider.
|
||||
*
|
||||
* @see \Drupal\Tests\migrate\Kernel\MigrateSourceTestBase::testSource
|
||||
*
|
||||
* @return 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.
|
||||
*/
|
||||
abstract public static function providerSource();
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue