diff --git a/core/modules/action/lib/Drupal/action/Tests/BulkFormTest.php b/core/modules/action/lib/Drupal/action/Tests/BulkFormTest.php index a59d294..dde3914 100644 --- a/core/modules/action/lib/Drupal/action/Tests/BulkFormTest.php +++ b/core/modules/action/lib/Drupal/action/Tests/BulkFormTest.php @@ -21,7 +21,7 @@ class BulkFormTest extends WebTestBase { * * @var array */ - public static $modules = array('action_bulk_test'); + public static $modules = array('node', 'action_bulk_test'); public static function getInfo() { return array( diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockPageViewTest.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockPageViewTest.php index 0841fd9..fafb357 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockPageViewTest.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockPageViewTest.php @@ -13,16 +13,6 @@ class CustomBlockPageViewTest extends CustomBlockTestBase { /** - * Permissions to grant admin user. - * - * @var array - */ - protected $permissions = array( - 'administer blocks', - 'access content' - ); - - /** * Modules to enable. * * @var array diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockHtmlTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockHtmlTest.php index a6bf316..63579b9 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockHtmlTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockHtmlTest.php @@ -40,7 +40,7 @@ function setUp() { $this->drupalPlaceBlock('test_html', array('id' => 'test_html_block')); // Enable a menu block, to test more complicated HTML. - $this->drupalPlaceBlock('system_menu_block:tools'); + $this->drupalPlaceBlock('system_menu_block:admin'); } /** diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockRenderOrderTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockRenderOrderTest.php index da6202e..0521aa9 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockRenderOrderTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockRenderOrderTest.php @@ -19,7 +19,7 @@ class BlockRenderOrderTest extends WebTestBase { * * @var array */ - public static $modules = array('block'); + public static $modules = array('node', 'block'); public static function getInfo() { return array( diff --git a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php index b86a1ea..3c9745f 100644 --- a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php @@ -24,7 +24,7 @@ class DisplayBlockTest extends ViewTestBase { * * @var array */ - public static $modules = array('block_test_views', 'test_page_test', 'contextual', 'views_ui'); + public static $modules = array('node', 'block_test_views', 'test_page_test', 'contextual', 'views_ui'); /** * Views used by this test. diff --git a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php index 906e6e7..a715fb4 100644 --- a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php +++ b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php @@ -369,10 +369,9 @@ public static function baseFieldDefinitions($entity_type) { ->setDescription(t('The parent comment ID if this is a reply to a comment.')) ->setSetting('target_type', 'comment'); - $fields['entity_id'] = FieldDefinition::create('entity_reference') + $fields['entity_id'] = FieldDefinition::create('integer') ->setLabel(t('Entity ID')) ->setDescription(t('The ID of the entity of which this comment is a reply.')) - ->setSetting('target_type', 'node') ->setRequired(TRUE); $fields['langcode'] = FieldDefinition::create('language') diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentLanguageTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentLanguageTest.php index 3e738ce..15a389c 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentLanguageTest.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentLanguageTest.php @@ -23,7 +23,7 @@ class CommentLanguageTest extends WebTestBase { * * @var array */ - public static $modules = array('language', 'language_test', 'comment_test'); + public static $modules = array('node', 'language', 'language_test', 'comment_test'); public static function getInfo() { return array( diff --git a/core/modules/comment/lib/Drupal/comment/Tests/Views/CommentTestBase.php b/core/modules/comment/lib/Drupal/comment/Tests/Views/CommentTestBase.php index 83e34aa..32ffa1f 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/Views/CommentTestBase.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/Views/CommentTestBase.php @@ -20,7 +20,7 @@ * * @var array */ - public static $modules = array('comment', 'comment_test_views'); + public static $modules = array('node', 'comment', 'comment_test_views'); /** * Stores a comment used by the tests. diff --git a/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php b/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php index 807fc58..4ec7428 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php @@ -18,7 +18,7 @@ class DefaultViewRecentComments extends ViewTestBase { * * @var array */ - public static $modules = array('comment', 'block'); + public static $modules = array('node', 'comment', 'block'); /** * Number of results for the Master display. diff --git a/core/modules/comment/lib/Drupal/comment/Tests/Views/WizardTest.php b/core/modules/comment/lib/Drupal/comment/Tests/Views/WizardTest.php index a74f774..764a51a 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/Views/WizardTest.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/Views/WizardTest.php @@ -21,7 +21,7 @@ class WizardTest extends WizardTestBase { * * @var array */ - public static $modules = array('comment'); + public static $modules = array('node', 'comment'); public static function getInfo() { diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php b/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php index 393db33..ed4b1e2 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php @@ -23,7 +23,7 @@ class ConfigTranslationUiTest extends WebTestBase { * * @var array */ - public static $modules = array('contact', 'config_translation', 'config_translation_test', 'views', 'views_ui', 'contextual'); + public static $modules = array('node', 'contact', 'config_translation', 'config_translation_test', 'views', 'views_ui', 'contextual'); /** * Languages to enable. diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationViewListUiTest.php b/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationViewListUiTest.php index eb45b82..a4982e10 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationViewListUiTest.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationViewListUiTest.php @@ -19,7 +19,7 @@ class ConfigTranslationViewListUiTest extends UITestBase { * * @var array */ - public static $testViews = array('test_view'); + public static $testViews = array('node', 'test_view'); /** * Modules to enable. diff --git a/core/modules/contact/tests/modules/contact_test_views/test_views/views.view.test_contact_link.yml b/core/modules/contact/tests/modules/contact_test_views/test_views/views.view.test_contact_link.yml index 1771823..a42573f 100644 --- a/core/modules/contact/tests/modules/contact_test_views/test_views/views.view.test_contact_link.yml +++ b/core/modules/contact/tests/modules/contact_test_views/test_views/views.view.test_contact_link.yml @@ -11,10 +11,7 @@ display: position: 1 display_options: access: - type: perm - options: - perm: 'access content' - perm: 'access user profiles' + type: none cache: type: none options: { } diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAdminTest.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAdminTest.php index 20707b8..37cf7bb 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAdminTest.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAdminTest.php @@ -21,7 +21,7 @@ public static function getInfo() { ); } - public static $modules = array('field_ui', 'entity_reference'); + public static $modules = array('node', 'field_ui', 'entity_reference'); public function setUp() { parent::setUp(); diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/Views/SelectionTest.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/Views/SelectionTest.php index 7e6a652..4c018bb 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/Views/SelectionTest.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/Views/SelectionTest.php @@ -14,7 +14,7 @@ */ class SelectionTest extends WebTestBase { - public static $modules = array('views', 'entity_reference', 'entity_reference_test', 'entity_test'); + public static $modules = array('node', 'views', 'entity_reference', 'entity_reference_test', 'entity_test'); public static function getInfo() { return array( diff --git a/core/modules/field/lib/Drupal/field/Tests/Views/FieldTestBase.php b/core/modules/field/lib/Drupal/field/Tests/Views/FieldTestBase.php index 22d0b88..7badfb6 100644 --- a/core/modules/field/lib/Drupal/field/Tests/Views/FieldTestBase.php +++ b/core/modules/field/lib/Drupal/field/Tests/Views/FieldTestBase.php @@ -32,7 +32,7 @@ * * @var array */ - public static $modules = array('field_test_views'); + public static $modules = array('node', 'field_test_views'); /** * Stores the field definitions used by the test. diff --git a/core/modules/file/lib/Drupal/file/Tests/FileFieldTestBase.php b/core/modules/file/lib/Drupal/file/Tests/FileFieldTestBase.php index 7a8f3c5..75339a3 100644 --- a/core/modules/file/lib/Drupal/file/Tests/FileFieldTestBase.php +++ b/core/modules/file/lib/Drupal/file/Tests/FileFieldTestBase.php @@ -20,7 +20,7 @@ * * @var array */ - public static $modules = array('file', 'file_module_test', 'field_ui'); + public static $modules = array('node', 'file', 'file_module_test', 'field_ui'); protected $admin_user; diff --git a/core/modules/file/lib/Drupal/file/Tests/SaveUploadTest.php b/core/modules/file/lib/Drupal/file/Tests/SaveUploadTest.php index d9b570f..6596f87 100644 --- a/core/modules/file/lib/Drupal/file/Tests/SaveUploadTest.php +++ b/core/modules/file/lib/Drupal/file/Tests/SaveUploadTest.php @@ -36,7 +36,7 @@ public static function getInfo() { function setUp() { parent::setUp(); - $account = $this->drupalCreateUser(array('access content')); + $account = $this->drupalCreateUser(); $this->drupalLogin($account); $image_files = $this->drupalGetTestFiles('image'); diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterFormatAccessTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterFormatAccessTest.php index cbf1661..e402fda 100644 --- a/core/modules/filter/lib/Drupal/filter/Tests/FilterFormatAccessTest.php +++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterFormatAccessTest.php @@ -13,6 +13,14 @@ * Tests the filter format access functionality in the Filter module. */ class FilterFormatAccessTest extends WebTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('filter', 'node'); + /** * A user with administrative permissions. * diff --git a/core/modules/language/lib/Drupal/language/Tests/LanguageConfigurationElementTest.php b/core/modules/language/lib/Drupal/language/Tests/LanguageConfigurationElementTest.php index d5a3c02..5b413f8 100644 --- a/core/modules/language/lib/Drupal/language/Tests/LanguageConfigurationElementTest.php +++ b/core/modules/language/lib/Drupal/language/Tests/LanguageConfigurationElementTest.php @@ -20,7 +20,7 @@ class LanguageConfigurationElementTest extends WebTestBase { * * @var array */ - public static $modules = array('language', 'language_elements_test'); + public static $modules = array('node', 'language', 'language_elements_test'); public static function getInfo() { return array( diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleContentTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleContentTest.php index 1c2c597..093da50 100644 --- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleContentTest.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleContentTest.php @@ -19,7 +19,7 @@ class LocaleContentTest extends WebTestBase { * * @var array */ - public static $modules = array('locale'); + public static $modules = array('node', 'locale'); public static function getInfo() { return array( diff --git a/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php b/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php index 48f9361..b2e7d78 100644 --- a/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php +++ b/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php @@ -17,7 +17,7 @@ class MenuTest extends MenuWebTestBase { * * @var array */ - public static $modules = array('block', 'contextual', 'help', 'path', 'test_page_test'); + public static $modules = array('node', 'block', 'contextual', 'help', 'path', 'test_page_test'); /** * A user with administration rights. diff --git a/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateNodeConfigsTest.php b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateNodeConfigsTest.php index a44b229..d24ed35 100644 --- a/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateNodeConfigsTest.php +++ b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateNodeConfigsTest.php @@ -14,6 +14,13 @@ class MigrateNodeConfigsTest extends MigrateDrupalTestBase { /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('node'); + + /** * {@inheritdoc} */ public static function getInfo() { diff --git a/core/modules/node/node.install b/core/modules/node/node.install index ba15fa3..eaa022c 100644 --- a/core/modules/node/node.install +++ b/core/modules/node/node.install @@ -423,6 +423,18 @@ function node_schema() { * Implements hook_install(). */ function node_install() { + // Enable default permissions for system roles. + // IMPORTANT: Modules SHOULD NOT automatically grant any user role access + // permissions in hook_install(). + // However, the 'access content' permission is a very special case, since + // there is hardly a point in installing the Node module without granting + // these permissions. Doing so also allows tests to continue to operate as + // expected without first having to manually grant these default permissions. + if (\Drupal::moduleHandler()->moduleExists('user')) { + user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access content')); + user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('access content')); + } + // Populate the node access table. db_insert('node_access') ->fields(array( diff --git a/core/modules/options/lib/Drupal/options/Tests/OptionsFieldUITest.php b/core/modules/options/lib/Drupal/options/Tests/OptionsFieldUITest.php index 8793db2..f7a922c 100644 --- a/core/modules/options/lib/Drupal/options/Tests/OptionsFieldUITest.php +++ b/core/modules/options/lib/Drupal/options/Tests/OptionsFieldUITest.php @@ -19,7 +19,7 @@ class OptionsFieldUITest extends FieldTestBase { * * @var array */ - public static $modules = array('options', 'field_test', 'taxonomy', 'field_ui'); + public static $modules = array('node', 'options', 'field_test', 'taxonomy', 'field_ui'); /** * The name of the created content type. diff --git a/core/modules/options/lib/Drupal/options/Tests/OptionsWidgetsTest.php b/core/modules/options/lib/Drupal/options/Tests/OptionsWidgetsTest.php index 02304b6..57d3e14 100644 --- a/core/modules/options/lib/Drupal/options/Tests/OptionsWidgetsTest.php +++ b/core/modules/options/lib/Drupal/options/Tests/OptionsWidgetsTest.php @@ -19,7 +19,7 @@ class OptionsWidgetsTest extends FieldTestBase { * * @var array */ - public static $modules = array('options', 'entity_test', 'options_test', 'taxonomy', 'field_ui'); + public static $modules = array('node', 'options', 'entity_test', 'options_test', 'taxonomy', 'field_ui'); /** * A field with cardinality 1 to use in this test class. diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/UserAttributesTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/UserAttributesTest.php index 073490d..7d2a099 100644 --- a/core/modules/rdf/lib/Drupal/rdf/Tests/UserAttributesTest.php +++ b/core/modules/rdf/lib/Drupal/rdf/Tests/UserAttributesTest.php @@ -19,7 +19,7 @@ class UserAttributesTest extends WebTestBase { * * @var array */ - public static $modules = array('rdf'); + public static $modules = array('rdf', 'node'); public static function getInfo() { return array( diff --git a/core/modules/rest/lib/Drupal/rest/Tests/RESTTestBase.php b/core/modules/rest/lib/Drupal/rest/Tests/RESTTestBase.php index 021e1f9..5f3ed46 100644 --- a/core/modules/rest/lib/Drupal/rest/Tests/RESTTestBase.php +++ b/core/modules/rest/lib/Drupal/rest/Tests/RESTTestBase.php @@ -43,6 +43,13 @@ */ protected $defaultAuth; + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('rest', 'entity_test', 'node'); + protected function setUp() { parent::setUp(); $this->defaultFormat = 'hal_json'; diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutTestBase.php b/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutTestBase.php index 58b0313..9dc04dc 100644 --- a/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutTestBase.php +++ b/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutTestBase.php @@ -20,7 +20,7 @@ * * @var array */ - public static $modules = array('toolbar', 'shortcut'); + public static $modules = array('node', 'toolbar', 'shortcut'); /** * User with permission to administer shortcuts. diff --git a/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php b/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php index 2a19a5c1..25853ad 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php @@ -144,7 +144,7 @@ function testUserAgentValidation() { function testWebTestRunner() { $this->pass = t('SimpleTest pass.'); $this->fail = t('SimpleTest fail.'); - $this->valid_permission = 'access content'; + $this->valid_permission = 'access administration pages'; $this->invalid_permission = 'invalid permission'; if ($this->inCURL()) { diff --git a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsLoggingTest.php b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsLoggingTest.php index 8443155..ec85e46 100644 --- a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsLoggingTest.php +++ b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsLoggingTest.php @@ -22,7 +22,7 @@ class StatisticsLoggingTest extends WebTestBase { * * @var array */ - public static $modules = array('statistics', 'block'); + public static $modules = array('node', 'statistics', 'block'); /** * The Guzzle HTTP client. diff --git a/core/modules/statistics/lib/Drupal/statistics/Tests/Views/IntegrationTest.php b/core/modules/statistics/lib/Drupal/statistics/Tests/Views/IntegrationTest.php index fd447d1..7d3e567 100644 --- a/core/modules/statistics/lib/Drupal/statistics/Tests/Views/IntegrationTest.php +++ b/core/modules/statistics/lib/Drupal/statistics/Tests/Views/IntegrationTest.php @@ -23,7 +23,7 @@ class IntegrationTest extends ViewTestBase { * * @var array */ - public static $modules = array('statistics', 'statistics_test_views'); + public static $modules = array('statistics', 'statistics_test_views', 'node'); /** * Stores the user object that accesses the page. diff --git a/core/modules/system/lib/Drupal/system/Tests/Ajax/AjaxTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Ajax/AjaxTestBase.php index 24a572a..588da09 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Ajax/AjaxTestBase.php +++ b/core/modules/system/lib/Drupal/system/Tests/Ajax/AjaxTestBase.php @@ -19,7 +19,7 @@ * * @var array */ - public static $modules = array('ajax_test', 'ajax_forms_test'); + public static $modules = array('node', 'ajax_test', 'ajax_forms_test'); /** * Asserts the array of Ajax commands contains the searched command. diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/WriteRecordTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/WriteRecordTest.php index ee4fe4d..ffe5fdb 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Common/WriteRecordTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Common/WriteRecordTest.php @@ -19,7 +19,7 @@ class WriteRecordTest extends WebTestBase { * * @var array */ - public static $modules = array('database_test'); + public static $modules = array('database_test', 'node'); public static function getInfo() { return array( diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityRevisionsTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityRevisionsTest.php index a6066c6..b64ec89 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityRevisionsTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityRevisionsTest.php @@ -34,9 +34,6 @@ public function setUp() { // Create and login user. $this->web_user = $this->drupalCreateUser(array( - 'view all revisions', - 'revert all revisions', - 'delete all revisions', 'administer entity_test content', )); $this->drupalLogin($this->web_user); diff --git a/core/modules/system/lib/Drupal/system/Tests/Form/RebuildTest.php b/core/modules/system/lib/Drupal/system/Tests/Form/RebuildTest.php index a05e684..001714a 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Form/RebuildTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Form/RebuildTest.php @@ -22,7 +22,7 @@ class RebuildTest extends WebTestBase { * * @var array */ - public static $modules = array('form_test'); + public static $modules = array('node', 'form_test'); public static function getInfo() { return array( diff --git a/core/modules/system/lib/Drupal/system/Tests/Form/StorageTest.php b/core/modules/system/lib/Drupal/system/Tests/Form/StorageTest.php index 766878e..a723143 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Form/StorageTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Form/StorageTest.php @@ -38,7 +38,7 @@ public static function getInfo() { function setUp() { parent::setUp(); - $this->web_user = $this->drupalCreateUser(array('access content')); + $this->web_user = $this->drupalCreateUser(); $this->drupalLogin($this->web_user); } diff --git a/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php b/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php index 70f2dc5..4dd3e1a 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php @@ -127,7 +127,7 @@ protected function doTestDescriptionMenuItems() { * Tests for menu_link_maintain(). */ protected function doTestMenuLinkMaintain() { - $admin_user = $this->drupalCreateUser(array('access content', 'administer site configuration')); + $admin_user = $this->drupalCreateUser(array('administer site configuration')); $this->drupalLogin($admin_user); // Create three menu items. diff --git a/core/modules/system/lib/Drupal/system/Tests/Module/DependencyTest.php b/core/modules/system/lib/Drupal/system/Tests/Module/DependencyTest.php index d8a28d9..9faec48 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Module/DependencyTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Module/DependencyTest.php @@ -121,12 +121,13 @@ function testModuleEnableOrder() { $this->assertModules(array('module_test'), TRUE); \Drupal::state()->set('module_test.dependency', 'dependency'); // module_test creates a dependency chain: - // - forum depends on taxonomy, comment, datetime, history, and ban (via module_test) + // - forum depends on node, taxonomy, comment, datetime, history, and + // ban (via module_test) // - 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', 'datetime', 'comment', 'history', 'number', 'options', 'taxonomy', 'forum'); + $expected_order = array('xmlrpc', 'ban', 'node', 'datetime', 'comment', 'history', 'number', 'options', 'taxonomy', 'forum'); // Enable the modules through the UI, verifying that the dependency chain // is correct. @@ -134,7 +135,8 @@ 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 History, Taxonomy, Options, Number, Comment, Datetime, Ban, XML-RPC modules to install Forum.')); + $this->assertText(t('You must enable the Node, History, Taxonomy, Options, Number, Comment, Datetime, Ban, XML-RPC modules to install Forum.')); + $edit['modules[Core][node][enable]'] = 'node'; $edit['modules[Core][history][enable]'] = 'history'; $edit['modules[Field types][options][enable]'] = 'options'; $edit['modules[Field types][number][enable]'] = 'number'; @@ -144,7 +146,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', 'xmlrpc', 'datetime', 'comment', 'history', 'taxonomy', 'options', 'number'), TRUE); + $this->assertModules(array('forum', 'ban', 'node', '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(); diff --git a/core/modules/system/lib/Drupal/system/Tests/ParamConverter/UpcastingTest.php b/core/modules/system/lib/Drupal/system/Tests/ParamConverter/UpcastingTest.php index f1ff08f..31d0a0f 100644 --- a/core/modules/system/lib/Drupal/system/Tests/ParamConverter/UpcastingTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/ParamConverter/UpcastingTest.php @@ -28,7 +28,7 @@ public static function getInfo() { ); } - public static $modules = array('paramconverter_test'); + public static $modules = array('paramconverter_test', 'node'); /** * Confirms that all parameters are converted as expected. diff --git a/core/modules/system/lib/Drupal/system/Tests/Session/SessionTest.php b/core/modules/system/lib/Drupal/system/Tests/Session/SessionTest.php index 52c45a4..16d3eec 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Session/SessionTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Session/SessionTest.php @@ -39,7 +39,7 @@ function testSessionSaveRegenerate() { $this->assertTrue(drupal_save_session(), 'drupal_save_session() correctly returns TRUE when saving has been enabled.', 'Session'); // Test session hardening code from SA-2008-044. - $user = $this->drupalCreateUser(array('access content')); + $user = $this->drupalCreateUser(); // Enable sessions. $this->sessionReset($user->id()); @@ -81,7 +81,7 @@ function testSessionSaveRegenerate() { * Test data persistence via the session_test module callbacks. */ function testDataPersistence() { - $user = $this->drupalCreateUser(array('access content')); + $user = $this->drupalCreateUser(array()); // Enable sessions. $this->sessionReset($user->id()); @@ -133,7 +133,7 @@ function testDataPersistence() { $this->assertNoText($value_1, 'Session has persisted for an authenticated user after logging out and then back in.', 'Session'); // Change session and create another user. - $user2 = $this->drupalCreateUser(array('access content')); + $user2 = $this->drupalCreateUser(array()); $this->sessionReset($user2->id()); $this->drupalLogin($user2); } @@ -198,7 +198,7 @@ function testEmptyAnonymousSession() { * Test that sessions are only saved when necessary. */ function testSessionWrite() { - $user = $this->drupalCreateUser(array('access content')); + $user = $this->drupalCreateUser(array()); $this->drupalLogin($user); $sql = 'SELECT u.access, s.timestamp FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE u.uid = :uid'; @@ -246,7 +246,7 @@ function testSessionWrite() { * Test that empty session IDs are not allowed. */ function testEmptySessionID() { - $user = $this->drupalCreateUser(array('access content')); + $user = $this->drupalCreateUser(array()); $this->drupalLogin($user); $this->drupalGet('session-test/is-logged-in'); $this->assertResponse(200, 'User is logged in.'); diff --git a/core/modules/system/lib/Drupal/system/Tests/System/DateTimeTest.php b/core/modules/system/lib/Drupal/system/Tests/System/DateTimeTest.php index f00b5ba..abc85b4 100644 --- a/core/modules/system/lib/Drupal/system/Tests/System/DateTimeTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/System/DateTimeTest.php @@ -20,7 +20,7 @@ class DateTimeTest extends WebTestBase { * * @var array */ - public static $modules = array('language'); + public static $modules = array('node', 'language'); public static function getInfo() { return array( diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php index 492dfd6..a07533d 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php @@ -20,7 +20,7 @@ class ThemeTest extends WebTestBase { * * @var array */ - public static $modules = array('theme_test'); + public static $modules = array('theme_test', 'node'); public static function getInfo() { return array( diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigDebugMarkupTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigDebugMarkupTest.php index 3a26efe..ccfd353 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigDebugMarkupTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigDebugMarkupTest.php @@ -19,7 +19,7 @@ class TwigDebugMarkupTest extends WebTestBase { * * @var array */ - public static $modules = array('theme_test'); + public static $modules = array('theme_test', 'node'); public static function getInfo() { return array( diff --git a/core/modules/taxonomy/taxonomy.info.yml b/core/modules/taxonomy/taxonomy.info.yml index 2fe12f0..c559074 100644 --- a/core/modules/taxonomy/taxonomy.info.yml +++ b/core/modules/taxonomy/taxonomy.info.yml @@ -5,6 +5,7 @@ package: Core version: VERSION core: 8.x dependencies: + - node - options - text configure: taxonomy.vocabulary_list diff --git a/core/modules/toolbar/lib/Drupal/toolbar/Tests/ToolbarAdminMenuTest.php b/core/modules/toolbar/lib/Drupal/toolbar/Tests/ToolbarAdminMenuTest.php index 7fec4ac..3ca1039 100644 --- a/core/modules/toolbar/lib/Drupal/toolbar/Tests/ToolbarAdminMenuTest.php +++ b/core/modules/toolbar/lib/Drupal/toolbar/Tests/ToolbarAdminMenuTest.php @@ -53,7 +53,7 @@ class ToolbarAdminMenuTest extends WebTestBase { * * @var array */ - public static $modules = array('block', 'menu', 'user', 'taxonomy', 'toolbar', 'language', 'test_page_test', 'locale'); + public static $modules = array('node', 'block', 'menu', 'user', 'taxonomy', 'toolbar', 'language', 'test_page_test', 'locale'); public static function getInfo() { return array( diff --git a/core/modules/tracker/tracker.info.yml b/core/modules/tracker/tracker.info.yml index e3fb4b7..be8d61b 100644 --- a/core/modules/tracker/tracker.info.yml +++ b/core/modules/tracker/tracker.info.yml @@ -2,6 +2,7 @@ name: Tracker type: module description: 'Enables tracking of recent content for users.' dependencies: + - node - comment package: Core version: VERSION diff --git a/core/modules/tracker/tracker.module b/core/modules/tracker/tracker.module index cb467ea..c94f0e7 100644 --- a/core/modules/tracker/tracker.module +++ b/core/modules/tracker/tracker.module @@ -207,7 +207,7 @@ function tracker_comment_update(CommentInterface $comment) { // $comment->save() calls hook_comment_publish() for all published comments // so we need to handle all other values here. if ($comment->status->value != CommentInterface::PUBLISHED && $comment->entity_type->value == 'node') { - _tracker_remove($comment->entity_id->target_id, $comment->getOwnerId(), $comment->changed->value); + _tracker_remove($comment->entity_id->value, $comment->getOwnerId(), $comment->changed->value); } } @@ -219,7 +219,7 @@ function tracker_comment_update(CommentInterface $comment) { */ function tracker_comment_publish(CommentInterface $comment) { if ($comment->entity_type->value == 'node') { - _tracker_add($comment->entity_id->target_id, $comment->getOwnerId(), $comment->changed->value); + _tracker_add($comment->entity_id->value, $comment->getOwnerId(), $comment->changed->value); } } @@ -228,7 +228,7 @@ function tracker_comment_publish(CommentInterface $comment) { */ function tracker_comment_unpublish(CommentInterface $comment) { if ($comment->entity_type->value == 'node') { - _tracker_remove($comment->entity_id->target_id, $comment->getOwnerId(), $comment->changed->value); + _tracker_remove($comment->entity_id->value, $comment->getOwnerId(), $comment->changed->value); } } @@ -237,7 +237,7 @@ function tracker_comment_unpublish(CommentInterface $comment) { */ function tracker_comment_delete(CommentInterface $comment) { if ($comment->entity_type->value == 'node') { - _tracker_remove($comment->entity_id->target_id, $comment->getOwnerId(), $comment->changed->value); + _tracker_remove($comment->entity_id->value, $comment->getOwnerId(), $comment->changed->value); } } diff --git a/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php b/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php index c9d893d..cc8f652 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php @@ -14,6 +14,13 @@ */ class UserCancelTest extends WebTestBase { + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('node'); + public static function getInfo() { return array( 'name' => 'Cancel account', diff --git a/core/modules/user/lib/Drupal/user/Tests/UserDeleteTest.php b/core/modules/user/lib/Drupal/user/Tests/UserDeleteTest.php index 5626096..92746c8 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserDeleteTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserDeleteTest.php @@ -27,9 +27,9 @@ public static function getInfo() { */ function testUserDeleteMultiple() { // Create a few users with permissions, so roles will be created. - $user_a = $this->drupalCreateUser(array('access content')); - $user_b = $this->drupalCreateUser(array('access content')); - $user_c = $this->drupalCreateUser(array('access content')); + $user_a = $this->drupalCreateUser(array('access user profiles')); + $user_b = $this->drupalCreateUser(array('access user profiles')); + $user_c = $this->drupalCreateUser(array('access user profiles')); $uids = array($user_a->id(), $user_b->id(), $user_c->id()); diff --git a/core/modules/user/lib/Drupal/user/Tests/UserPermissionsTest.php b/core/modules/user/lib/Drupal/user/Tests/UserPermissionsTest.php index fac4a54..78c8d6d 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserPermissionsTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserPermissionsTest.php @@ -46,14 +46,14 @@ function testUserPermissionChanges() { $this->assertIdentical($previous_permissions_hash, $permissions_hash_generator->generate($this->loggedInUser)); // Add a permission. - $this->assertFalse($account->hasPermission('administer nodes'), 'User does not have "administer nodes" permission.'); + $this->assertFalse($account->hasPermission('administer users'), 'User does not have "administer users" permission.'); $edit = array(); - $edit[$rid . '[administer nodes]'] = TRUE; + $edit[$rid . '[administer users]'] = TRUE; $this->drupalPostForm('admin/people/permissions', $edit, t('Save permissions')); $this->assertText(t('The changes have been saved.'), 'Successful save message displayed.'); $storage_controller = $this->container->get('entity.manager')->getStorageController('user_role'); $storage_controller->resetCache(); - $this->assertTrue($account->hasPermission('administer nodes'), 'User now has "administer nodes" permission.'); + $this->assertTrue($account->hasPermission('administer users'), 'User now has "administer users" permission.'); $current_permissions_hash = $permissions_hash_generator->generate($account); $this->assertIdentical($current_permissions_hash, $permissions_hash_generator->generate($this->loggedInUser)); $this->assertNotEqual($previous_permissions_hash, $current_permissions_hash, 'Permissions hash has changed.'); @@ -105,19 +105,19 @@ function testUserRoleChangePermissions() { $previous_permissions_hash = $permissions_hash_generator->generate($account); // Verify current permissions. - $this->assertFalse($account->hasPermission('administer nodes'), 'User does not have "administer nodes" permission.'); + $this->assertFalse($account->hasPermission('administer users'), 'User does not have "administer users" permission.'); $this->assertTrue($account->hasPermission('access user profiles'), 'User has "access user profiles" permission.'); $this->assertTrue($account->hasPermission('administer site configuration'), 'User has "administer site configuration" permission.'); // Change permissions. $permissions = array( - 'administer nodes' => 1, + 'administer users' => 1, 'access user profiles' => 0, ); user_role_change_permissions($rid, $permissions); // Verify proper permission changes. - $this->assertTrue($account->hasPermission('administer nodes'), 'User now has "administer nodes" permission.'); + $this->assertTrue($account->hasPermission('administer users'), 'User now has "administer users" permission.'); $this->assertFalse($account->hasPermission('access user profiles'), 'User no longer has "access user profiles" permission.'); $this->assertTrue($account->hasPermission('administer site configuration'), 'User still has "administer site configuration" permission.'); diff --git a/core/modules/user/lib/Drupal/user/Tests/UserRolesAssignmentTest.php b/core/modules/user/lib/Drupal/user/Tests/UserRolesAssignmentTest.php index b9cd7f8..99133ea 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserRolesAssignmentTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserRolesAssignmentTest.php @@ -34,7 +34,7 @@ function setUp() { * again. */ function testAssignAndRemoveRole() { - $rid = $this->drupalCreateRole(array('administer content types')); + $rid = $this->drupalCreateRole(array('administer users')); $account = $this->drupalCreateUser(); // Assign the role to the user. @@ -55,7 +55,7 @@ function testAssignAndRemoveRole() { * be removed again. */ function testCreateUserWithRole() { - $rid = $this->drupalCreateRole(array('administer content types')); + $rid = $this->drupalCreateRole(array('administer users')); // Create a new user and add the role at the same time. $edit = array( 'name' => $this->randomName(), diff --git a/core/modules/user/lib/Drupal/user/Tests/UserSignatureTest.php b/core/modules/user/lib/Drupal/user/Tests/UserSignatureTest.php index 25fd8d9..74a1712 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserSignatureTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserSignatureTest.php @@ -19,7 +19,7 @@ class UserSignatureTest extends WebTestBase { * * @var array */ - public static $modules = array('comment'); + public static $modules = array('node', 'comment'); public static function getInfo() { return array( diff --git a/core/modules/user/lib/Drupal/user/Tests/UserTimeZoneTest.php b/core/modules/user/lib/Drupal/user/Tests/UserTimeZoneTest.php index 956a257..0702799 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserTimeZoneTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserTimeZoneTest.php @@ -13,6 +13,14 @@ * Tests for user-configurable time zones. */ class UserTimeZoneTest extends WebTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('node'); + public static function getInfo() { return array( 'name' => 'User time zones', diff --git a/core/modules/user/lib/Drupal/user/Tests/UserValidateCurrentPassCustomFormTest.php b/core/modules/user/lib/Drupal/user/Tests/UserValidateCurrentPassCustomFormTest.php index 43b6856..c533766 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserValidateCurrentPassCustomFormTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserValidateCurrentPassCustomFormTest.php @@ -43,7 +43,7 @@ function setUp() { parent::setUp(); // Create two users - $this->accessUser = $this->drupalCreateUser(array('access content')); + $this->accessUser = $this->drupalCreateUser(array()); $this->adminUser = $this->drupalCreateUser(array('administer users')); } diff --git a/core/modules/user/lib/Drupal/user/Tests/Views/UserTestBase.php b/core/modules/user/lib/Drupal/user/Tests/Views/UserTestBase.php index 0b4df3d..51017dc 100644 --- a/core/modules/user/lib/Drupal/user/Tests/Views/UserTestBase.php +++ b/core/modules/user/lib/Drupal/user/Tests/Views/UserTestBase.php @@ -20,7 +20,7 @@ * * @var array */ - public static $modules = array('user_test_views'); + public static $modules = array('user_test_views', 'node'); /** * Users to use during this test. diff --git a/core/modules/views/lib/Drupal/views/Tests/Entity/FieldEntityTest.php b/core/modules/views/lib/Drupal/views/Tests/Entity/FieldEntityTest.php index 310326c..95e661e 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Entity/FieldEntityTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Entity/FieldEntityTest.php @@ -26,7 +26,7 @@ class FieldEntityTest extends ViewTestBase { * * @var array */ - public static $modules = array('comment'); + public static $modules = array('node', 'comment'); public static function getInfo() { return array( diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/AreaHTTPStatusCodeTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/AreaHTTPStatusCodeTest.php index 31348ba..b2f5c08 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/AreaHTTPStatusCodeTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/AreaHTTPStatusCodeTest.php @@ -21,6 +21,13 @@ class AreaHTTPStatusCodeTest extends HandlerTestBase { */ public static $testViews = array('test_http_status_code'); + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('node'); + public static function getInfo() { return array( 'name' => 'Area: HTTP Status Code', diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/AreaTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/AreaTest.php index 7b0368e..e7007de 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/AreaTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/AreaTest.php @@ -27,7 +27,7 @@ class AreaTest extends HandlerTestBase { * * @var array */ - public static $modules = array('views_ui'); + public static $modules = array('node', 'views_ui'); public static function getInfo() { return array( diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/ArgumentStringTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/ArgumentStringTest.php index e483f16..3119adb 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/ArgumentStringTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/ArgumentStringTest.php @@ -19,6 +19,13 @@ class ArgumentStringTest extends HandlerTestBase { */ public static $testViews = array('test_glossary'); + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('node'); + public static function getInfo() { return array( 'name' => 'Argument: String', diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldDropButtonTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldDropButtonTest.php index f4203cd..9d6654a 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldDropButtonTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldDropButtonTest.php @@ -23,6 +23,13 @@ class FieldDropButtonTest extends HandlerTestBase { */ public static $testViews = array('test_dropbutton'); + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('node'); + public static function getInfo() { return array( 'name' => 'Field: Dropbutton', diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FilterDateTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FilterDateTest.php index ead8b35c..cd94718 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/FilterDateTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FilterDateTest.php @@ -24,7 +24,7 @@ class FilterDateTest extends HandlerTestBase { * * @var array */ - public static $modules = array('views_ui'); + public static $modules = array('node', 'views_ui'); public static function getInfo() { return array( diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/AccessTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/AccessTest.php index 9fe91bb..52cdb42 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/AccessTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/AccessTest.php @@ -22,7 +22,7 @@ class AccessTest extends PluginTestBase { * * @var array */ - public static $testViews = array('test_access_none', 'test_access_static', 'test_access_dynamic'); + public static $testViews = array('node', 'test_access_none', 'test_access_static', 'test_access_dynamic'); public static function getInfo() { return array( diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php index ced33c2..d849320 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php @@ -27,7 +27,7 @@ class ArgumentDefaultTest extends PluginTestBase { * * @var array */ - public static $modules = array('views_ui'); + public static $modules = array('node', 'views_ui'); public static function getInfo() { return array( diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayFeedTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayFeedTest.php index 1d7a208..484734e 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayFeedTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayFeedTest.php @@ -26,7 +26,7 @@ class DisplayFeedTest extends PluginTestBase { * * @var array */ - public static $modules = array('views_ui'); + public static $modules = array('node', 'views_ui'); public static function getInfo() { return array( diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/ExposedFormTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/ExposedFormTest.php index 2ad29c9..4f70653 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/ExposedFormTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/ExposedFormTest.php @@ -28,7 +28,7 @@ class ExposedFormTest extends ViewTestBase { * * @var array */ - public static $modules = array('views_ui', 'block'); + public static $modules = array('node', 'views_ui', 'block'); public static function getInfo() { return array( diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/MiniPagerTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/MiniPagerTest.php index 10955d4..62961d6 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/MiniPagerTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/MiniPagerTest.php @@ -22,6 +22,13 @@ class MiniPagerTest extends PluginTestBase { public static $testViews = array('test_mini_pager'); /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('node'); + + /** * Nodes used by the test. * * @var array diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php index 7cb233e..9b4a20c 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php @@ -24,7 +24,7 @@ class PagerTest extends PluginTestBase { * * @var array */ - public static $modules = array('views_ui'); + public static $modules = array('node', 'views_ui'); public static function getInfo() { return array( diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewsTaxonomyAutocompleteTest.php b/core/modules/views/lib/Drupal/views/Tests/ViewsTaxonomyAutocompleteTest.php index df73f40..c7af87f 100644 --- a/core/modules/views/lib/Drupal/views/Tests/ViewsTaxonomyAutocompleteTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/ViewsTaxonomyAutocompleteTest.php @@ -43,7 +43,7 @@ class ViewsTaxonomyAutocompleteTest extends ViewTestBase { * * @var array */ - public static $modules = array('taxonomy'); + public static $modules = array('node', 'taxonomy'); public static function getInfo() { return array( diff --git a/core/modules/views/lib/Drupal/views/Tests/Wizard/WizardTestBase.php b/core/modules/views/lib/Drupal/views/Tests/Wizard/WizardTestBase.php index 0abb524..1a8acd4 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Wizard/WizardTestBase.php +++ b/core/modules/views/lib/Drupal/views/Tests/Wizard/WizardTestBase.php @@ -19,7 +19,7 @@ * * @var array */ - public static $modules = array('views_ui', 'block'); + public static $modules = array('node', 'views_ui', 'block'); function setUp() { parent::setUp(); diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_display_attachment.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_display_attachment.yml index 82f3ff1..c2d9ced 100644 --- a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_display_attachment.yml +++ b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_display_attachment.yml @@ -11,7 +11,7 @@ display: position: null display_options: access: - type: perm + type: none cache: type: none query: diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/UITestBase.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/UITestBase.php index d064490..4eee5d8 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/UITestBase.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/UITestBase.php @@ -33,7 +33,7 @@ * * @var array */ - public static $modules = array('views_ui', 'block'); + public static $modules = array('node', 'views_ui', 'block'); protected function setUp() { parent::setUp(); diff --git a/core/profiles/minimal/minimal.install b/core/profiles/minimal/minimal.install index 6f08fe7..52bea38 100644 --- a/core/profiles/minimal/minimal.install +++ b/core/profiles/minimal/minimal.install @@ -17,8 +17,4 @@ function minimal_install() { // Allow visitor account creation, but with administrative approval. \Drupal::config('user.settings')->set('register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL)->save(); - - // Enable default permissions for system roles. - user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access content')); - user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('access content')); } diff --git a/core/profiles/standard/standard.install b/core/profiles/standard/standard.install index 8718567..bcb1d5c 100644 --- a/core/profiles/standard/standard.install +++ b/core/profiles/standard/standard.install @@ -32,8 +32,8 @@ function standard_install() { $user_settings->set('register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL)->save(); // Enable default permissions for system roles. - user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access content', 'access comments')); - user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('access content', 'access comments', 'post comments', 'skip comment approval')); + user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access comments')); + user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('access comments', 'post comments', 'skip comment approval')); // Enable all permissions for the administrator role. user_role_grant_permissions('administrator', array_keys(\Drupal::moduleHandler()->invokeAll('permission'))); diff --git a/core/profiles/testing/testing.info.yml b/core/profiles/testing/testing.info.yml index d1076e6..b905706 100644 --- a/core/profiles/testing/testing.info.yml +++ b/core/profiles/testing/testing.info.yml @@ -4,5 +4,3 @@ description: 'Minimal profile for running tests. Includes absolutely required mo version: VERSION core: 8.x hidden: true -dependencies: - - node diff --git a/core/profiles/testing/testing.install b/core/profiles/testing/testing.install deleted file mode 100644 index 7575d22..0000000 --- a/core/profiles/testing/testing.install +++ /dev/null @@ -1,19 +0,0 @@ -