class MenuTest
Same name in this branch
- 9 core/modules/jsonapi/tests/src/Functional/MenuTest.php \Drupal\Tests\jsonapi\Functional\MenuTest
- 9 core/modules/views/tests/src/Functional/Wizard/MenuTest.php \Drupal\Tests\views\Functional\Wizard\MenuTest
Same name and namespace in other branches
- 11.x core/modules/jsonapi/tests/src/Functional/MenuTest.php \Drupal\Tests\jsonapi\Functional\MenuTest
- 11.x core/modules/views/tests/src/Functional/Wizard/MenuTest.php \Drupal\Tests\views\Functional\Wizard\MenuTest
- 11.x core/modules/system/tests/src/Kernel/Plugin/migrate/source/MenuTest.php \Drupal\Tests\system\Kernel\Plugin\migrate\source\MenuTest
- 11.x core/modules/migrate_drupal_ui/tests/modules/migrate_drupal_message_test/src/Plugin/migrate/source/MenuTest.php \Drupal\migrate_drupal_message_test\Plugin\migrate\source\MenuTest
Tests menu source plugin.
@covers Drupal\system\Plugin\migrate\source\Menu
@group system
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\system\Kernel\Plugin\migrate\source\MenuTest 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 MenuTest
File
-
core/
modules/ system/ tests/ src/ Kernel/ Plugin/ migrate/ source/ MenuTest.php, line 14
Namespace
Drupal\Tests\system\Kernel\Plugin\migrate\sourceView source
class MenuTest extends MigrateSqlSourceTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'system',
'migrate_drupal',
];
/**
* {@inheritdoc}
*/
public function providerSource() {
$tests = [];
// The source data.
$tests[0]['source_data']['menu_custom'] = [
[
'menu_name' => 'menu-name-1',
'title' => 'menu custom value 1',
'description' => 'menu custom description value 1',
],
[
'menu_name' => 'menu-name-2',
'title' => 'menu custom value 2',
'description' => 'menu custom description value 2',
],
];
// The expected results are identical to the source data.
$tests[0]['expected_data'] = $tests[0]['source_data']['menu_custom'];
$tests[1] = $tests[0];
$tests[1]['source_data']['menu_custom'][0] += [
'language' => 'it',
'i18n_mode' => 1,
];
$tests[1]['source_data']['menu_custom'][1] += [
'language' => 'fr',
'i18n_mode' => 2,
];
$tests[1]['expected_data'] = $tests[1]['source_data']['menu_custom'];
return $tests;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.