Skip to content
Snippets Groups Projects
Verified Commit 5d87e70d authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3414637 by Abhijith S, quietone, smustgrave: Remove usages of book module from tests

parent e5fc18c5
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ description: 'Test Theme with libraries-extend'
version: VERSION
base theme: starterkit_theme
libraries-extend:
starterkit_theme/book-navigation:
starterkit_theme/test-navigation:
- test_theme_libraries_extend/extend_one
- test_theme_libraries_extend/extend_two
core/drupal.dialog:
......
......@@ -29,11 +29,7 @@ class TestViewsTest extends KernelTestBase {
* @var array
*/
protected static $modules = [
// `node.type.book` config entity is a config dependency.
// @see core/modules/book/tests/modules/book_test_views/test_views/views.view.test_book_view.yml
'book',
// For NodeType config entities to exist, its module must be installed.
// @see book_entity_type_build()
'node',
// The `DRUPAL_OPTIONAL` constant is used by the NodeType config entity type
// and only available if the system module is installed.
......@@ -127,9 +123,6 @@ class TestViewsTest extends KernelTestBase {
*/
protected function setUp(): void {
parent::setUp();
// `node.type.book` config entity is a config dependency.
// @see core/modules/book/tests/modules/book_test_views/test_views/views.view.test_book_view.yml
$this->installConfig('book');
// `field.storage.node.body` config entity is a config dependency. It is one
// of the default config of the Node module.
// @see core/modules/node/tests/modules/node_test_views/test_views/views.view.test_node_tokens.yml
......
......@@ -188,14 +188,14 @@ public function testBaseThemeLibrariesOverrideInSubTheme() {
* Tests libraries-extend.
*/
public function testLibrariesExtend() {
// Simulate starterkit_theme defining the book-navigation library.
// Simulate starterkit_theme defining the test-navigation library.
// @see theme_test_library_info_alter()
$this->container->get('state')
->set('theme_test_library_info_alter starterkit_theme', [
'book-navigation' => [
'test-navigation' => [
'css' => [
'component' => [
'css/components/book-navigation.css' => [],
'css/components/test-navigation.css' => [],
],
],
],
......@@ -203,16 +203,16 @@ public function testLibrariesExtend() {
// Activate starterkit_theme and verify the libraries are not extended.
$this->activateTheme('starterkit_theme');
$this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/css/extend_1.css', 'starterkit_theme', 'book-navigation', 'css');
$this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/js/extend_1.js', 'starterkit_theme', 'book-navigation', 'js');
$this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/css/extend_2.css', 'starterkit_theme', 'book-navigation', 'css');
$this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/css/extend_1.css', 'starterkit_theme', 'test-navigation', 'css');
$this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/js/extend_1.js', 'starterkit_theme', 'test-navigation', 'js');
$this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/css/extend_2.css', 'starterkit_theme', 'test-navigation', 'css');
// Activate the theme that extends the book-navigation library in
// Activate the theme that extends the test-navigation library in
// starterkit_theme.
$this->activateTheme('test_theme_libraries_extend');
$this->assertAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/css/extend_1.css', 'starterkit_theme', 'book-navigation', 'css');
$this->assertAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/js/extend_1.js', 'starterkit_theme', 'book-navigation', 'js');
$this->assertAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/css/extend_2.css', 'starterkit_theme', 'book-navigation', 'css');
$this->assertAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/css/extend_1.css', 'starterkit_theme', 'test-navigation', 'css');
$this->assertAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/js/extend_1.js', 'starterkit_theme', 'test-navigation', 'js');
$this->assertAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/css/extend_2.css', 'starterkit_theme', 'test-navigation', 'css');
// Activate a sub theme and confirm that it inherits the library assets
// extended in the base theme as well as its own.
......
......@@ -565,7 +565,7 @@ public function testUnmetDependency() {
$extensions['module']['unknown_module'] = 0;
$extensions['theme']['unknown_theme'] = 0;
// Add a module and a theme that depend on uninstalled extensions.
$extensions['module']['book'] = 0;
$extensions['module']['new_dependency_test'] = 0;
$extensions['theme']['test_subtheme'] = 0;
$sync->write('core.extension', $extensions);
......@@ -578,7 +578,7 @@ public function testUnmetDependency() {
$expected = [
static::FAIL_MESSAGE,
'Unable to install the <em class="placeholder">unknown_module</em> module since it does not exist.',
'Unable to install the <em class="placeholder">Book</em> module since it requires the <em class="placeholder">Node, Text, Field, Filter, User</em> modules.',
'Unable to install the <em class="placeholder">New Dependency test</em> module since it requires the <em class="placeholder">New Dependency test with service</em> module.',
'Unable to install the <em class="placeholder">unknown_theme</em> theme since it does not exist.',
'Unable to install the <em class="placeholder">Theme test subtheme</em> theme since it requires the <em class="placeholder">Theme test base theme</em> theme.',
'Configuration <em class="placeholder">config_test.dynamic.dotted.config</em> depends on the <em class="placeholder">unknown</em> configuration that will not exist after import.',
......@@ -591,7 +591,7 @@ public function testUnmetDependency() {
$error_log = $config_importer->getErrors();
$expected = [
'Unable to install the <em class="placeholder">unknown_module</em> module since it does not exist.',
'Unable to install the <em class="placeholder">Book</em> module since it requires the <em class="placeholder">Node, Text, Field, Filter, User</em> modules.',
'Unable to install the <em class="placeholder">New Dependency test</em> module since it requires the <em class="placeholder">New Dependency test with service</em> module.',
'Unable to install the <em class="placeholder">unknown_theme</em> theme since it does not exist.',
'Configuration <em class="placeholder">config_test.dynamic.dotted.config</em> depends on the <em class="placeholder">unknown</em> configuration that will not exist after import.',
'Configuration <em class="placeholder">config_test.dynamic.dotted.existing</em> depends on the <em class="placeholder">config_test.dynamic.dotted.deleted</em> configuration that will not exist after import.',
......@@ -621,7 +621,7 @@ public function testUnmetDependency() {
$expected = [
static::FAIL_MESSAGE,
'Unable to install the <em class="placeholder">unknown_module</em> module since it does not exist.',
'Unable to install the <em class="placeholder">Book</em> module since it requires the <em class="placeholder">Node, Text, Field, Filter, User</em> modules.',
'Unable to install the <em class="placeholder">New Dependency test</em> module since it requires the <em class="placeholder">New Dependency test with service</em> module.',
'Unable to install the <em class="placeholder">unknown_theme</em> theme since it does not exist.',
'Unable to install the <em class="placeholder">Theme test subtheme</em> theme since it requires the <em class="placeholder">Theme test base theme</em> theme.',
'Configuration <em class="placeholder">config_test.dynamic.dotted.config</em> depends on configuration (<em class="placeholder">unknown, unknown2</em>) that will not exist after import.',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment