VariableTest.php in Zircon Profile 8
File
core/modules/migrate_drupal/tests/src/Unit/source/VariableTest.php
View source
<?php
namespace Drupal\Tests\migrate_drupal\Unit\source;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
class VariableTest extends MigrateSqlSourceTestCase {
const PLUGIN_CLASS = 'Drupal\\migrate_drupal\\Plugin\\migrate\\source\\Variable';
protected $migrationConfiguration = array(
'id' => 'test',
'highWaterProperty' => array(
'field' => 'test',
),
'source' => array(
'plugin' => 'd6_variable',
'variables' => array(
'foo',
'bar',
),
),
);
protected $expectedResults = array(
array(
'id' => 'foo',
'foo' => 1,
'bar' => FALSE,
),
);
protected $databaseContents = array(
'variable' => array(
array(
'name' => 'foo',
'value' => 'i:1;',
),
array(
'name' => 'bar',
'value' => 'b:0;',
),
),
);
}