VariableMultiRowTestBase.php in Drupal 8
File
core/modules/migrate_drupal/tests/src/Unit/source/VariableMultiRowTestBase.php
View source
<?php
namespace Drupal\Tests\migrate_drupal\Unit\source;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
abstract class VariableMultiRowTestBase extends MigrateSqlSourceTestCase {
const PLUGIN_CLASS = 'Drupal\\migrate_drupal\\Plugin\\migrate\\source\\VariableMultiRow';
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;',
],
],
];
}