VariableTest.php
Same filename in this branch
Same filename in other branches
- 9 core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableTest.php
- 9 core/tests/Drupal/Tests/Component/Utility/VariableTest.php
- 10 core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableTest.php
- 10 core/tests/Drupal/Tests/Component/Utility/VariableTest.php
- 11.x core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableTest.php
- 11.x core/tests/Drupal/Tests/Component/Utility/VariableTest.php
Namespace
Drupal\Tests\migrate_drupal\Unit\sourceFile
-
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;
/**
* 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;',
],
],
];
}
Classes
Title | Deprecated | Summary |
---|---|---|
VariableTest | Tests the variable source plugin. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.