class NodeTranslationTest
Same name in this branch
- 9 core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTranslationTest.php \Drupal\Tests\node\Kernel\Plugin\migrate\source\d7\NodeTranslationTest
Same name and namespace in other branches
- 11.x core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTranslationTest.php \Drupal\Tests\node\Kernel\Plugin\migrate\source\d6\NodeTranslationTest
- 11.x core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTranslationTest.php \Drupal\Tests\node\Kernel\Plugin\migrate\source\d7\NodeTranslationTest
Tests D6 node translation source plugin.
@covers \Drupal\node\Plugin\migrate\source\d6\Node
@group node
Hierarchy
- class \Drupal\KernelTests\KernelTestBase extends \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\Tests\migrate\Kernel\MigrateSourceTestBase implements \Drupal\KernelTests\KernelTestBase
- class \Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase implements \Drupal\Tests\migrate\Kernel\MigrateSourceTestBase
- class \Drupal\Tests\node\Kernel\Plugin\migrate\source\d6\NodeTest implements \Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase
- class \Drupal\Tests\node\Kernel\Plugin\migrate\source\d6\NodeTranslationTest implements \Drupal\Tests\node\Kernel\Plugin\migrate\source\d6\NodeTest
- class \Drupal\Tests\node\Kernel\Plugin\migrate\source\d6\NodeTest implements \Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase
- class \Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase implements \Drupal\Tests\migrate\Kernel\MigrateSourceTestBase
- class \Drupal\Tests\migrate\Kernel\MigrateSourceTestBase implements \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of NodeTranslationTest
File
-
core/
modules/ node/ tests/ src/ Kernel/ Plugin/ migrate/ source/ d6/ NodeTranslationTest.php, line 12
Namespace
Drupal\Tests\node\Kernel\Plugin\migrate\source\d6View source
class NodeTranslationTest extends NodeTest {
/**
* {@inheritdoc}
*/
protected static $modules = [
'node',
'user',
'migrate_drupal',
];
/**
* {@inheritdoc}
*/
public function providerSource() {
// Get the source data from parent.
$tests = parent::providerSource();
// The expected results.
$tests[0]['expected_data'] = [
[
'nid' => 7,
'vid' => 7,
'type' => 'story',
'language' => 'fr',
'title' => 'node title 7',
'node_uid' => 1,
'revision_uid' => 2,
'status' => 1,
'created' => 1279290910,
'changed' => 1279308995,
'comment' => 0,
'promote' => 1,
'moderate' => 0,
'sticky' => 0,
'tnid' => 6,
'translate' => 0,
// Node revision fields.
'body' => 'body for node 7',
'teaser' => 'body for node 7',
'log' => '',
'timestamp' => 1279308995,
'format' => 1,
],
];
// Do an automatic count.
$tests[0]['expected_count'] = NULL;
// Set up source plugin configuration.
$tests[0]['configuration'] = [
'translations' => TRUE,
];
return $tests;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.