class VariableMultiRowTestBase
Base class for variable multirow source unit tests.
Hierarchy
- class \Drupal\Tests\UnitTestCase uses \Drupal\Tests\PhpunitCompatibilityTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\migrate\Unit\MigrateTestCase extends \Drupal\Tests\UnitTestCase
- class \Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase extends \Drupal\Tests\migrate\Unit\MigrateTestCase
- class \Drupal\Tests\migrate_drupal\Unit\source\VariableMultiRowTestBase extends \Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase
- class \Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase extends \Drupal\Tests\migrate\Unit\MigrateTestCase
- class \Drupal\Tests\migrate\Unit\MigrateTestCase extends \Drupal\Tests\UnitTestCase
Expanded class hierarchy of VariableMultiRowTestBase
File
-
core/
modules/ migrate_drupal/ tests/ src/ Unit/ source/ VariableMultiRowTestBase.php, line 10
Namespace
Drupal\Tests\migrate_drupal\Unit\sourceView source
abstract class VariableMultiRowTestBase extends MigrateSqlSourceTestCase {
// The plugin system is not working during unit testing so the source plugin
// class needs to be manually specified.
const PLUGIN_CLASS = 'Drupal\\migrate_drupal\\Plugin\\migrate\\source\\VariableMultiRow';
// The fake Migration configuration entity.
protected $migrationConfiguration = [
'id' => 'test',
'source' => [
'plugin' => 'd6_variable_multirow',
'variables' => [
'foo',
'bar',
],
],
];
protected $expectedResults = [
[
'name' => 'foo',
'value' => 1,
],
[
'name' => 'bar',
'value' => FALSE,
],
];
protected $databaseContents = [
'variable' => [
[
'name' => 'foo',
'value' => 'i:1;',
],
[
'name' => 'bar',
'value' => 'b:0;',
],
],
];
}
Members
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.