
| Current Path : /var/www/html/dataninja.cn/core/modules/migrate_drupal/tests/src/Unit/source/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/dataninja.cn/core/modules/migrate_drupal/tests/src/Unit/source/VariableTest.php |
<?php
namespace Drupal\Tests\migrate_drupal\Unit\source;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
/**
* Tests the variable source plugin.
*
* @group migrate_drupal
*/
class VariableTest extends MigrateSqlSourceTestCase {
const PLUGIN_CLASS = 'Drupal\migrate_drupal\Plugin\migrate\source\Variable';
protected $migrationConfiguration = [
'id' => 'test',
'highWaterProperty' => ['field' => 'test'],
'source' => [
'plugin' => 'd6_variable',
'variables' => [
'foo',
'bar',
],
],
];
protected $expectedResults = [
[
'id' => 'foo',
'foo' => 1,
'bar' => FALSE,
],
];
protected $databaseContents = [
'variable' => [
['name' => 'foo', 'value' => 'i:1;'],
['name' => 'bar', 'value' => 'b:0;'],
],
];
}