Skip to content
Snippets Groups Projects
Commit 9fc89d90 authored by catch's avatar catch
Browse files

Issue #2191285 by sun, andypost, jibran, Berdir, alexpott: Text module is not...

Issue #2191285 by sun, andypost, jibran, Berdir, alexpott: Text module is not required, but is marked as required.
parent 0f9e59fd
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Showing
with 46 additions and 16 deletions
......@@ -128,7 +128,7 @@ public function testExport() {
// Spot check several known simple configuration files.
$element = $this->xpath('//select[@name="config_name"]');
$options = $this->getAllOptions($element[0]);
$expected_options = array('filter.settings', 'system.site', 'user.settings');
$expected_options = array('system.site', 'user.settings');
foreach ($options as &$option) {
$option = (string) $option;
}
......
......@@ -20,7 +20,7 @@ class ContactSitewideTest extends WebTestBase {
*
* @var array
*/
public static $modules = array('contact', 'field_ui');
public static $modules = array('text', 'contact', 'field_ui');
public static function getInfo() {
return array(
......
......@@ -16,6 +16,13 @@
*/
abstract class ContentTranslationTestBase extends WebTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array('text');
/**
* The entity type being tested.
*
......
......@@ -87,7 +87,7 @@ function field_help($path, $arg) {
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Enabling field types') . '</dt>';
$output .= '<dd>' . t('The Field module provides the infrastructure for fields and field attachment; the field types and input widgets themselves are provided by additional modules. Some of the modules are required; the optional modules can be enabled from the <a href="@modules">Modules administration page</a>. Drupal core includes the following field type modules: Number (required), Text (required), List (required), Taxonomy (optional), Image (optional), and File (optional); the required Options module provides input widgets for other field modules. Additional fields and widgets may be provided by contributed modules, which you can find in the <a href="@contrib">contributed module section of Drupal.org</a>. Currently enabled field and input widget modules:', array('@modules' => url('admin/modules'), '@contrib' => 'http://drupal.org/project/modules', '@options' => url('admin/help/options')));
$output .= '<dd>' . t('The Field module provides the infrastructure for fields and field attachment; the field types and input widgets themselves are provided by additional modules. The modules can be enabled from the <a href="@modules">Modules administration page</a>. Drupal core includes the following field type modules: Text, Number, Email, Link, Telephone, Image, File, Options, Taxonomy, and Entity Reference. Additional fields and widgets may be provided by contributed modules, which you can find in the <a href="@contrib">contributed module section of Drupal.org</a>.', array('@modules' => url('admin/modules'), '@contrib' => 'http://drupal.org/project/modules', '@options' => url('admin/help/options')));
// Make a list of all widget and field modules currently enabled, ordered
// by displayed module name (module names are not translated).
......@@ -95,6 +95,7 @@ function field_help($path, $arg) {
$info = system_get_info('module');
$field_widgets = \Drupal::service('plugin.manager.field.widget')->getDefinitions();
$field_types = \Drupal::service('plugin.manager.field.field_type')->getConfigurableDefinitions();
$providers = array();
foreach (array_merge($field_types, $field_widgets) as $plugin) {
$providers[] = $plugin['provider'];
}
......@@ -113,11 +114,14 @@ function field_help($path, $arg) {
}
}
}
$item_list = array(
'#theme' => 'item_list',
'#items' => $items,
);
$output .= drupal_render($item_list);
if ($items) {
$output .= ' ' . t('Currently enabled field and input widget modules:');
$item_list = array(
'#theme' => 'item_list',
'#items' => $items,
);
$output .= drupal_render($item_list);
}
return $output;
}
}
......
......@@ -13,6 +13,14 @@
* Tests the default filter functionality in the Filter module.
*/
class FilterDefaultFormatTest extends WebTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array('filter');
public static function getInfo() {
return array(
'name' => 'Default text format functionality',
......
......@@ -13,6 +13,14 @@
* Tests the behavior of check_markup() when it is called without text format.
*/
class FilterNoFormatTest extends WebTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array('filter');
public static function getInfo() {
return array(
'name' => 'Unassigned text format functionality',
......
......@@ -19,7 +19,7 @@ class ArbitraryRebuildTest extends WebTestBase {
*
* @var array
*/
public static $modules = array('form_test');
public static $modules = array('text', 'form_test');
public static function getInfo() {
return array(
......
......@@ -16,7 +16,7 @@ class FormTest extends WebTestBase {
*
* @var array
*/
public static $modules = array('form_test', 'file', 'datetime');
public static $modules = array('filter', 'form_test', 'file', 'datetime');
public static function getInfo() {
return array(
......
......@@ -2,7 +2,7 @@
/**
* @file
* Definition of Drupal\system\Tests\Module\DependencyTest.
* Contains \Drupal\system\Tests\Module\DependencyTest.
*/
namespace Drupal\system\Tests\Module;
......@@ -108,7 +108,6 @@ function testEnableRequirementsFailureDependency() {
// Makes sure that already enabled modules the failing modules depend on
// were not disabled.
$this->assertModules(array('comment'), TRUE);
}
/**
......@@ -123,11 +122,13 @@ function testModuleEnableOrder() {
// module_test creates a dependency chain:
// - forum depends on node, taxonomy, comment, datetime, history, and
// ban (via module_test)
// - node depends on text
// - text depends on filter
// - taxonomy depends on options
// - options depends on number
// - ban depends on xmlrpc (via module_test)
// The correct enable order is:
$expected_order = array('xmlrpc', 'ban', 'node', 'datetime', 'comment', 'history', 'number', 'options', 'taxonomy', 'forum');
$expected_order = array('filter', 'xmlrpc', 'ban', 'text', 'node', 'datetime', 'comment', 'history', 'number', 'options', 'taxonomy', 'forum');
// Enable the modules through the UI, verifying that the dependency chain
// is correct.
......@@ -135,8 +136,10 @@ function testModuleEnableOrder() {
$edit['modules[Core][forum][enable]'] = 'forum';
$this->drupalPostForm('admin/modules', $edit, t('Save configuration'));
$this->assertModules(array('forum'), FALSE);
$this->assertText(t('You must enable the Node, History, Taxonomy, Options, Number, Comment, Datetime, Ban, XML-RPC modules to install Forum.'));
$this->assertText(t('You must enable the Node, Text, Filter, History, Taxonomy, Options, Number, Comment, Datetime, Ban, XML-RPC modules to install Forum.'));
$edit['modules[Core][node][enable]'] = 'node';
$edit['modules[Field types][text][enable]'] = 'text';
$edit['modules[Core][filter][enable]'] = 'filter';
$edit['modules[Core][history][enable]'] = 'history';
$edit['modules[Field types][options][enable]'] = 'options';
$edit['modules[Field types][number][enable]'] = 'number';
......@@ -146,7 +149,7 @@ function testModuleEnableOrder() {
$edit['modules[Core][ban][enable]'] = 'ban';
$edit['modules[Core][xmlrpc][enable]'] = 'xmlrpc';
$this->drupalPostForm('admin/modules', $edit, t('Save configuration'));
$this->assertModules(array('forum', 'ban', 'node', 'xmlrpc', 'datetime', 'comment', 'history', 'taxonomy', 'options', 'number'), TRUE);
$this->assertModules(array('forum', 'ban', 'node', 'text', 'filter', 'xmlrpc', 'datetime', 'comment', 'history', 'taxonomy', 'options', 'number'), TRUE);
// Check the actual order which is saved by module_test_modules_enabled().
$module_order = \Drupal::state()->get('module_test.install_order') ?: array();
......@@ -181,4 +184,5 @@ function testUninstallDependents() {
$this->drupalPostForm(NULL, NULL, t('Uninstall'));
$this->assertText(t('The selected modules have been uninstalled.'), 'Modules status has been updated.');
}
}
......@@ -4,7 +4,6 @@ description: 'Defines simple text field types.'
package: Field types
version: VERSION
core: 8.x
required: true
dependencies:
- field
- filter
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment