class MigrateBookConfigsTest
Same name in this branch
- 9 core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookConfigsTest.php \Drupal\Tests\book\Kernel\Migrate\d7\MigrateBookConfigsTest
Same name and namespace in other branches
- 10 core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookConfigsTest.php \Drupal\Tests\book\Kernel\Migrate\d6\MigrateBookConfigsTest
- 10 core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookConfigsTest.php \Drupal\Tests\book\Kernel\Migrate\d7\MigrateBookConfigsTest
- 8.9.x core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookConfigsTest.php \Drupal\Tests\book\Kernel\Migrate\d6\MigrateBookConfigsTest
- 8.9.x core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookConfigsTest.php \Drupal\Tests\book\Kernel\Migrate\d7\MigrateBookConfigsTest
Upgrade variables to book.settings.yml.
@group migrate_drupal_6
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\MigrateTestBase extends \Drupal\migrate\MigrateMessageInterface implements \Drupal\KernelTests\KernelTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase implements \Drupal\Tests\migrate\Kernel\MigrateTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase uses \Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait implements \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase
- class \Drupal\Tests\book\Kernel\Migrate\d6\MigrateBookConfigsTest uses \Drupal\Tests\SchemaCheckTestTrait implements \Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase
- class \Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase uses \Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait implements \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase implements \Drupal\Tests\migrate\Kernel\MigrateTestBase
- class \Drupal\Tests\migrate\Kernel\MigrateTestBase extends \Drupal\migrate\MigrateMessageInterface implements \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of MigrateBookConfigsTest
File
-
core/
modules/ book/ tests/ src/ Kernel/ Migrate/ d6/ MigrateBookConfigsTest.php, line 13
Namespace
Drupal\Tests\book\Kernel\Migrate\d6View source
class MigrateBookConfigsTest extends MigrateDrupal6TestBase {
use SchemaCheckTestTrait;
/**
* {@inheritdoc}
*/
protected static $modules = [
'book',
];
/**
* Data provider for testBookSettings().
*
* @return array
* The data for each test scenario.
*/
public function providerBookSettings() {
return [
// d6_book_settings was renamed to book_settings, but use the old alias to
// prove that it works.
// @see book_migration_plugins_alter()
[
'd6_book_settings',
],
[
'book_settings',
],
];
}
/**
* Tests migration of book variables to book.settings.yml.
*
* @dataProvider providerBookSettings
*/
public function testBookSettings($migration_id) {
$this->executeMigration($migration_id);
$config = $this->config('book.settings');
$this->assertSame('book', $config->get('child_type'));
$this->assertSame('book pages', $config->get('block.navigation.mode'));
$this->assertSame([
'book',
], $config->get('allowed_types'));
$this->assertConfigSchema(\Drupal::service('config.typed'), 'book.settings', $config->get());
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.