Initial Drupal 11 with DDEV setup
This commit is contained in:
@ -0,0 +1,24 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- system.menu.admin
|
||||
module:
|
||||
- system
|
||||
theme:
|
||||
- stark
|
||||
id: stark_admin
|
||||
theme: stark
|
||||
region: sidebar_first
|
||||
weight: 1
|
||||
provider: null
|
||||
plugin: 'system_menu_block:admin'
|
||||
settings:
|
||||
id: 'system_menu_block:admin'
|
||||
label: Administration
|
||||
label_display: visible
|
||||
provider: system
|
||||
level: 1
|
||||
depth: null
|
||||
expand_all_items: false
|
||||
visibility: { }
|
||||
@ -0,0 +1,22 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- system
|
||||
theme:
|
||||
- stark
|
||||
id: stark_branding
|
||||
theme: stark
|
||||
region: header
|
||||
weight: 0
|
||||
provider: null
|
||||
plugin: system_branding_block
|
||||
settings:
|
||||
id: system_branding_block
|
||||
label: 'Site branding'
|
||||
label_display: '0'
|
||||
provider: system
|
||||
use_site_logo: true
|
||||
use_site_name: true
|
||||
use_site_slogan: true
|
||||
visibility: { }
|
||||
@ -0,0 +1,17 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
theme:
|
||||
- stark
|
||||
id: stark_local_actions
|
||||
theme: stark
|
||||
region: content
|
||||
weight: -10
|
||||
provider: null
|
||||
plugin: local_actions_block
|
||||
settings:
|
||||
id: local_actions_block
|
||||
label: 'Primary admin actions'
|
||||
label_display: '0'
|
||||
provider: core
|
||||
visibility: { }
|
||||
@ -0,0 +1,19 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
theme:
|
||||
- stark
|
||||
id: stark_local_tasks
|
||||
theme: stark
|
||||
region: content
|
||||
weight: -20
|
||||
provider: null
|
||||
plugin: local_tasks_block
|
||||
settings:
|
||||
id: local_tasks_block
|
||||
label: Tabs
|
||||
label_display: '0'
|
||||
provider: core
|
||||
primary: true
|
||||
secondary: true
|
||||
visibility: { }
|
||||
@ -0,0 +1,19 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- system
|
||||
theme:
|
||||
- stark
|
||||
id: stark_messages
|
||||
theme: stark
|
||||
region: highlighted
|
||||
weight: 0
|
||||
provider: null
|
||||
plugin: system_messages_block
|
||||
settings:
|
||||
id: system_messages_block
|
||||
label: 'Status messages'
|
||||
label_display: '0'
|
||||
provider: system
|
||||
visibility: { }
|
||||
@ -0,0 +1,17 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
theme:
|
||||
- stark
|
||||
id: stark_page_title
|
||||
theme: stark
|
||||
region: content
|
||||
weight: -30
|
||||
provider: null
|
||||
plugin: page_title_block
|
||||
settings:
|
||||
id: page_title_block
|
||||
label: 'Page title'
|
||||
label_display: '0'
|
||||
provider: core
|
||||
visibility: { }
|
||||
@ -0,0 +1,24 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- system.menu.tools
|
||||
module:
|
||||
- system
|
||||
theme:
|
||||
- stark
|
||||
id: stark_tools
|
||||
theme: stark
|
||||
region: sidebar_first
|
||||
weight: 0
|
||||
provider: null
|
||||
plugin: 'system_menu_block:tools'
|
||||
settings:
|
||||
id: 'system_menu_block:tools'
|
||||
label: Tools
|
||||
label_display: visible
|
||||
provider: system
|
||||
level: 1
|
||||
depth: null
|
||||
expand_all_items: false
|
||||
visibility: { }
|
||||
@ -0,0 +1,14 @@
|
||||
favicon:
|
||||
mimetype: image/vnd.microsoft.icon
|
||||
path: ''
|
||||
url: ''
|
||||
use_default: true
|
||||
features:
|
||||
comment_user_picture: true
|
||||
comment_user_verification: true
|
||||
favicon: true
|
||||
node_user_picture: false
|
||||
logo:
|
||||
path: ''
|
||||
url: ~
|
||||
use_default: true
|
||||
16
web/core/profiles/minimal/config/install/user.settings.yml
Normal file
16
web/core/profiles/minimal/config/install/user.settings.yml
Normal file
@ -0,0 +1,16 @@
|
||||
langcode: en
|
||||
anonymous: Anonymous
|
||||
verify_mail: true
|
||||
notify:
|
||||
cancel_confirm: true
|
||||
password_reset: true
|
||||
status_activated: true
|
||||
status_blocked: false
|
||||
status_canceled: false
|
||||
register_admin_created: true
|
||||
register_no_approval_required: true
|
||||
register_pending_approval: true
|
||||
register: admin_only
|
||||
cancel_method: user_cancel_block
|
||||
password_reset_timeout: 86400
|
||||
password_strength: true
|
||||
12
web/core/profiles/minimal/minimal.info.yml
Normal file
12
web/core/profiles/minimal/minimal.info.yml
Normal file
@ -0,0 +1,12 @@
|
||||
name: Minimal
|
||||
type: profile
|
||||
description: 'Build a custom site without pre-configured functionality. Suitable for advanced users.'
|
||||
version: VERSION
|
||||
install:
|
||||
- node
|
||||
- block
|
||||
- dblog
|
||||
- page_cache
|
||||
- dynamic_page_cache
|
||||
themes:
|
||||
- stark
|
||||
@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Drupal\Tests\minimal\Functional;
|
||||
|
||||
use Drupal\Tests\BrowserTestBase;
|
||||
use Drupal\Tests\RequirementsPageTrait;
|
||||
use Drupal\Tests\SchemaCheckTestTrait;
|
||||
use Drupal\user\UserInterface;
|
||||
|
||||
/**
|
||||
* Tests Minimal installation profile expectations.
|
||||
*
|
||||
* @group minimal
|
||||
*/
|
||||
class MinimalTest extends BrowserTestBase {
|
||||
|
||||
use SchemaCheckTestTrait;
|
||||
use RequirementsPageTrait;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $profile = 'minimal';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $defaultTheme = 'stark';
|
||||
|
||||
/**
|
||||
* Tests Minimal installation profile.
|
||||
*/
|
||||
public function testMinimal(): void {
|
||||
$this->drupalGet('');
|
||||
// Check the login block is present.
|
||||
$this->assertSession()->buttonExists('Log in');
|
||||
// Confirm anonymous users cannot create an account.
|
||||
$this->assertSession()->linkNotExists('Create new account');
|
||||
$this->assertSession()->statusCodeEquals(200);
|
||||
|
||||
// Create a user to test tools and navigation blocks for logged in users
|
||||
// with appropriate permissions.
|
||||
$user = $this->drupalCreateUser([
|
||||
'access administration pages',
|
||||
'administer content types',
|
||||
]);
|
||||
$this->drupalLogin($user);
|
||||
$this->drupalGet('');
|
||||
$this->assertSession()->pageTextContains('Tools');
|
||||
$this->assertSession()->pageTextContains('Administration');
|
||||
|
||||
// Ensure that there are no pending updates after installation.
|
||||
$this->drupalLogin($this->drupalCreateUser([
|
||||
'administer software updates',
|
||||
]));
|
||||
$this->drupalGet('update.php/selection');
|
||||
$this->updateRequirementsProblem();
|
||||
$this->drupalGet('update.php/selection');
|
||||
$this->assertSession()->pageTextContains('No pending updates.');
|
||||
|
||||
// Ensure that there are no pending entity updates after installation.
|
||||
$this->assertFalse($this->container->get('entity.definition_update_manager')->needsUpdates(), 'After installation, entity schema is up to date.');
|
||||
|
||||
// Ensure special configuration overrides are correct.
|
||||
$this->assertFalse($this->config('system.theme.global')->get('features.node_user_picture'), 'Configuration system.theme.global:features.node_user_picture is FALSE.');
|
||||
$this->assertEquals(UserInterface::REGISTER_ADMINISTRATORS_ONLY, $this->config('user.settings')->get('register'));
|
||||
|
||||
// Now we have all configuration imported, test all of them for schema
|
||||
// conformance. Ensures all imported default configuration is valid when
|
||||
// Minimal profile modules are enabled.
|
||||
$names = $this->container->get('config.storage')->listAll();
|
||||
/** @var \Drupal\Core\Config\TypedConfigManagerInterface $typed_config */
|
||||
$typed_config = $this->container->get('config.typed');
|
||||
foreach ($names as $name) {
|
||||
$config = $this->config($name);
|
||||
$this->assertConfigSchema($typed_config, $name, $config->get());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user