Upgraded drupal core with security updates
authorjenny <jenny@fennel.follybridge>
Fri, 18 Aug 2017 12:52:03 +0000 (13:52 +0100)
committerjenny <jenny@fennel.follybridge>
Fri, 18 Aug 2017 12:52:03 +0000 (13:52 +0100)
277 files changed:
composer.lock
composer.phar
vendor/composer/installed.json
web/core/CHANGELOG.txt
web/core/INSTALL.txt
web/core/MAINTAINERS.txt
web/core/core.api.php
web/core/core.services.yml
web/core/includes/entity.inc
web/core/lib/Drupal.php
web/core/lib/Drupal/Component/Utility/SafeMarkup.php
web/core/lib/Drupal/Core/Block/BlockManager.php
web/core/lib/Drupal/Core/Cache/CacheCollector.php
web/core/lib/Drupal/Core/Database/Query/ConditionInterface.php
web/core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php
web/core/lib/Drupal/Core/Entity/EntityManager.php
web/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php
web/core/lib/Drupal/Core/Field/FieldConfigBase.php
web/core/lib/Drupal/Core/Form/BaseFormIdInterface.php
web/core/lib/Drupal/Core/Render/theme.api.php
web/core/modules/aggregator/tests/src/Functional/AddFeedTest.php [moved from web/core/modules/aggregator/src/Tests/AddFeedTest.php with 98% similarity]
web/core/modules/aggregator/tests/src/Functional/AggregatorAdminTest.php [moved from web/core/modules/aggregator/src/Tests/AggregatorAdminTest.php with 83% similarity]
web/core/modules/aggregator/tests/src/Functional/AggregatorCronTest.php [moved from web/core/modules/aggregator/src/Tests/AggregatorCronTest.php with 93% similarity]
web/core/modules/aggregator/tests/src/Functional/AggregatorRenderingTest.php [moved from web/core/modules/aggregator/src/Tests/AggregatorRenderingTest.php with 91% similarity]
web/core/modules/aggregator/tests/src/Functional/FeedAdminDisplayTest.php [moved from web/core/modules/aggregator/src/Tests/FeedAdminDisplayTest.php with 98% similarity]
web/core/modules/aggregator/tests/src/Functional/FeedLanguageTest.php [moved from web/core/modules/aggregator/src/Tests/FeedLanguageTest.php with 95% similarity]
web/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php [moved from web/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php with 98% similarity]
web/core/modules/aggregator/tests/src/Functional/UpdateFeedTest.php [moved from web/core/modules/aggregator/src/Tests/UpdateFeedTest.php with 97% similarity]
web/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php
web/core/modules/block_content/src/Tests/Views/BlockContentTestBase.php
web/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php [moved from web/core/modules/block_content/src/Tests/BlockContentCreationTest.php with 98% similarity]
web/core/modules/block_content/tests/src/Functional/BlockContentListTest.php [moved from web/core/modules/block_content/src/Tests/BlockContentListTest.php with 95% similarity]
web/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php [moved from web/core/modules/block_content/src/Tests/BlockContentListViewsTest.php with 91% similarity]
web/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php [moved from web/core/modules/block_content/src/Tests/BlockContentTranslationUITest.php with 99% similarity]
web/core/modules/block_content/tests/src/Functional/BlockContentValidationTest.php [moved from web/core/modules/block_content/src/Tests/BlockContentValidationTest.php with 96% similarity]
web/core/modules/block_content/tests/src/Functional/Views/BlockContentFieldFilterTest.php [moved from web/core/modules/block_content/src/Tests/Views/BlockContentFieldFilterTest.php with 95% similarity]
web/core/modules/block_content/tests/src/Functional/Views/BlockContentIntegrationTest.php [moved from web/core/modules/block_content/src/Tests/Views/BlockContentIntegrationTest.php with 95% similarity]
web/core/modules/block_content/tests/src/Functional/Views/BlockContentRedirectTest.php [moved from web/core/modules/block_content/src/Tests/Views/BlockContentRedirectTest.php with 95% similarity]
web/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php [new file with mode: 0644]
web/core/modules/block_content/tests/src/Functional/Views/FieldTypeTest.php [moved from web/core/modules/block_content/src/Tests/Views/FieldTypeTest.php with 93% similarity]
web/core/modules/block_content/tests/src/Functional/Views/RevisionRelationshipsTest.php [moved from web/core/modules/block_content/src/Tests/Views/RevisionRelationshipsTest.php with 92% similarity]
web/core/modules/book/tests/src/Functional/Views/BookRelationshipTest.php [moved from web/core/modules/book/src/Tests/Views/BookRelationshipTest.php with 95% similarity]
web/core/modules/comment/src/Entity/Comment.php
web/core/modules/comment/tests/src/Unit/Entity/CommentLockTest.php
web/core/modules/config_translation/tests/src/Functional/ConfigTranslationFormTest.php [moved from web/core/modules/config_translation/src/Tests/ConfigTranslationFormTest.php with 92% similarity]
web/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php [moved from web/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php with 90% similarity]
web/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php [moved from web/core/modules/config_translation/src/Tests/ConfigTranslationUiThemeTest.php with 86% similarity]
web/core/modules/config_translation/tests/src/Functional/ConfigTranslationViewListUiTest.php [moved from web/core/modules/config_translation/src/Tests/ConfigTranslationViewListUiTest.php with 86% similarity]
web/core/modules/contact/tests/src/Functional/Views/ContactFieldsTest.php [moved from web/core/modules/contact/src/Tests/Views/ContactFieldsTest.php with 88% similarity]
web/core/modules/contact/tests/src/Functional/Views/ContactLinkTest.php [moved from web/core/modules/contact/src/Tests/Views/ContactLinkTest.php with 94% similarity]
web/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php
web/core/modules/content_moderation/tests/src/Kernel/InitialStateTest.php
web/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php
web/core/modules/content_translation/tests/src/Functional/ContentTestTranslationUITest.php [moved from web/core/modules/content_translation/src/Tests/ContentTestTranslationUITest.php with 93% similarity]
web/core/modules/content_translation/tests/src/Functional/ContentTranslationDisableSettingTest.php [moved from web/core/modules/content_translation/src/Tests/ContentTranslationDisableSettingTest.php with 96% similarity]
web/core/modules/content_translation/tests/src/Functional/ContentTranslationEnableTest.php [moved from web/core/modules/content_translation/src/Tests/ContentTranslationEnableTest.php with 88% similarity]
web/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php [moved from web/core/modules/content_translation/src/Tests/ContentTranslationLanguageChangeTest.php with 98% similarity]
web/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php [moved from web/core/modules/content_translation/src/Tests/ContentTranslationSettingsTest.php with 98% similarity]
web/core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php [moved from web/core/modules/content_translation/src/Tests/ContentTranslationSyncImageTest.php with 98% similarity]
web/core/modules/content_translation/tests/src/Functional/Views/ContentTranslationViewsUITest.php [moved from web/core/modules/content_translation/src/Tests/Views/ContentTranslationViewsUITest.php with 86% similarity]
web/core/modules/content_translation/tests/src/Functional/Views/TranslationLinkTest.php [moved from web/core/modules/content_translation/src/Tests/Views/TranslationLinkTest.php with 92% similarity]
web/core/modules/field/tests/modules/field_test/field_test.module
web/core/modules/field/tests/src/Kernel/FieldCrudTest.php
web/core/modules/file/migration_templates/d7_file.yml
web/core/modules/file/migration_templates/d7_file_private.yml [new file with mode: 0644]
web/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php [new file with mode: 0644]
web/core/modules/filter/src/Plugin/migrate/process/d6/FilterFormatPermission.php
web/core/modules/filter/tests/src/Kernel/Migrate/d6/FilterFormatPermissionTest.php [new file with mode: 0644]
web/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php [moved from web/core/modules/forum/src/Tests/Views/ForumIntegrationTest.php with 92% similarity]
web/core/modules/hal/src/LinkManager/RelationLinkManager.php
web/core/modules/hal/src/LinkManager/TypeLinkManager.php
web/core/modules/hal/tests/modules/hal_test/hal_test.module
web/core/modules/hal/tests/src/Functional/EntityResource/ImageStyle/ImageStyleHalJsonAnonTest.php
web/core/modules/hal/tests/src/Functional/EntityResource/ImageStyle/ImageStyleHalJsonBasicAuthTest.php
web/core/modules/hal/tests/src/Functional/EntityResource/ImageStyle/ImageStyleHalJsonCookieTest.php
web/core/modules/image/tests/src/Functional/ImageEffectsTest.php
web/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentSettingsTest.php [new file with mode: 0644]
web/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentSettingsTest.php [new file with mode: 0644]
web/core/modules/layout_discovery/layouts/threecol_33_34_33/threecol_33_34_33.css
web/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php [moved from web/core/modules/locale/src/Tests/LocaleConfigTranslationImportTest.php with 98% similarity]
web/core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php [moved from web/core/modules/locale/src/Tests/LocaleConfigTranslationTest.php with 97% similarity]
web/core/modules/locale/tests/src/Functional/LocaleExportTest.php [moved from web/core/modules/locale/src/Tests/LocaleExportTest.php with 97% similarity]
web/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php [moved from web/core/modules/locale/src/Tests/LocaleFileSystemFormTest.php with 91% similarity]
web/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php [moved from web/core/modules/locale/src/Tests/LocaleImportFunctionalTest.php with 99% similarity]
web/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php [moved from web/core/modules/locale/src/Tests/LocaleJavascriptTranslationTest.php with 92% similarity]
web/core/modules/locale/tests/src/Functional/LocaleLibraryAlterTest.php [moved from web/core/modules/locale/src/Tests/LocaleLibraryAlterTest.php with 85% similarity]
web/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php [moved from web/core/modules/locale/src/Tests/LocalePluralFormatTest.php with 99% similarity]
web/core/modules/locale/tests/src/Functional/LocaleTranslateStringTourTest.php [moved from web/core/modules/locale/src/Tests/LocaleTranslateStringTourTest.php with 96% similarity]
web/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php [moved from web/core/modules/locale/src/Tests/LocaleTranslationUiTest.php with 96% similarity]
web/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php [moved from web/core/modules/locale/src/Tests/LocaleUpdateBase.php with 98% similarity]
web/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php [moved from web/core/modules/locale/src/Tests/LocaleUpdateCronTest.php with 97% similarity]
web/core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php [moved from web/core/modules/locale/src/Tests/LocaleUpdateDevelopmentReleaseTest.php with 88% similarity]
web/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php [moved from web/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php with 99% similarity]
web/core/modules/locale/tests/src/Functional/LocaleUpdateTest.php [moved from web/core/modules/locale/src/Tests/LocaleUpdateTest.php with 99% similarity]
web/core/modules/migrate/src/Plugin/migrate/process/MigrationLookup.php
web/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldPluginManagerInterface.php
web/core/modules/migrate_drupal/src/Plugin/migrate/field/UserReference.php [new file with mode: 0644]
web/core/modules/migrate_drupal/tests/fixtures/drupal6.php
web/core/modules/migrate_drupal/tests/fixtures/drupal7.php
web/core/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php
web/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php
web/core/modules/migrate_drupal_ui/src/Tests/MigrateUpgradeTestBase.php
web/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateAccessTest.php [moved from web/core/modules/migrate_drupal_ui/src/Tests/MigrateAccessTest.php with 82% similarity]
web/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php [new file with mode: 0644]
web/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php [moved from web/core/modules/migrate_drupal_ui/src/Tests/d6/MigrateUpgrade6Test.php with 90% similarity]
web/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/core/modules/simpletest/files/html-1.txt [moved from web/core/modules/migrate_drupal_ui/src/Tests/d6/files/core/modules/simpletest/files/html-1.txt with 100% similarity]
web/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/core/modules/simpletest/files/image-1.png [moved from web/core/modules/migrate_drupal_ui/src/Tests/d6/files/core/modules/simpletest/files/image-1.png with 100% similarity]
web/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/core/modules/simpletest/files/image-2.jpg [moved from web/core/modules/migrate_drupal_ui/src/Tests/d6/files/core/modules/simpletest/files/image-2.jpg with 100% similarity]
web/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/core/modules/simpletest/files/image-test.gif [moved from web/core/modules/migrate_drupal_ui/src/Tests/d6/files/core/modules/simpletest/files/image-test.gif with 100% similarity]
web/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/core/modules/simpletest/files/image-test.jpg [moved from web/core/modules/migrate_drupal_ui/src/Tests/d6/files/core/modules/simpletest/files/image-test.jpg with 100% similarity]
web/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/core/modules/simpletest/files/image-test.png [moved from web/core/modules/migrate_drupal_ui/src/Tests/d6/files/core/modules/simpletest/files/image-test.png with 100% similarity]
web/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/tmp/some-temp-file.jpg [moved from web/core/modules/migrate_drupal_ui/src/Tests/d6/files/tmp/some-temp-file.jpg with 100% similarity]
web/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7Test.php [moved from web/core/modules/migrate_drupal_ui/src/Tests/d7/MigrateUpgrade7Test.php with 86% similarity]
web/core/modules/migrate_drupal_ui/tests/src/Functional/d7/files/sites/default/files/cube.jpeg [moved from web/core/modules/migrate_drupal_ui/src/Tests/d7/files/sites/default/files/cube.jpeg with 100% similarity]
web/core/modules/migrate_drupal_ui/tests/src/Functional/d7/files/sites/default/files/ds9.txt [moved from web/core/modules/migrate_drupal_ui/src/Tests/d7/files/sites/default/files/ds9.txt with 100% similarity]
web/core/modules/migrate_drupal_ui/tests/src/Functional/d7/files/sites/default/private/Babylon5.txt [new file with mode: 0644]
web/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php
web/core/modules/outside_in/css/outside_in.motion.css
web/core/modules/outside_in/css/outside_in.theme.css
web/core/modules/outside_in/src/Ajax/OpenOffCanvasDialogCommand.php
web/core/modules/outside_in/src/Block/BlockEntityOffCanvasForm.php
web/core/modules/outside_in/src/Tests/Ajax/OffCanvasDialogTest.php
web/core/modules/outside_in/templates/outside-in-page-wrapper.html.twig
web/core/modules/outside_in/tests/src/FunctionalJavascript/OffCanvasTest.php
web/core/modules/outside_in/tests/src/FunctionalJavascript/OutsideInBlockFormTest.php
web/core/modules/outside_in/tests/src/FunctionalJavascript/OutsideInJavascriptTestBase.php
web/core/modules/outside_in/tests/src/Unit/Ajax/OpenOffCanvasDialogCommandTest.php
web/core/modules/rdf/tests/src/Functional/EntityReferenceFieldAttributesTest.php
web/core/modules/rdf/tests/src/Functional/TaxonomyAttributesTest.php
web/core/modules/rest/config/schema/rest.schema.yml
web/core/modules/rest/rest.api.php
web/core/modules/rest/src/LinkManager/ConfigurableLinkManagerInterface.php
web/core/modules/rest/src/LinkManager/LinkManager.php
web/core/modules/rest/src/LinkManager/LinkManagerBase.php
web/core/modules/rest/src/LinkManager/LinkManagerInterface.php
web/core/modules/rest/src/LinkManager/RelationLinkManager.php
web/core/modules/rest/src/LinkManager/RelationLinkManagerInterface.php
web/core/modules/rest/src/LinkManager/TypeLinkManager.php
web/core/modules/rest/src/LinkManager/TypeLinkManagerInterface.php
web/core/modules/rest/src/Plugin/Type/ResourcePluginManager.php
web/core/modules/rest/src/RestServiceProvider.php
web/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentResourceTestBase.php
web/core/modules/simpletest/tests/src/Unit/TestDiscoveryTest.php [moved from web/core/modules/simpletest/tests/src/Unit/TestInfoParsingTest.php with 97% similarity]
web/core/modules/system/src/Tests/Database/DatabaseWebTestBase.php
web/core/modules/system/src/Tests/Database/FakeRecord.php
web/core/modules/system/src/Tests/Image/ToolkitTestBase.php
web/core/modules/system/tests/modules/entity_test/entity_test.module
web/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoUuid.php [new file with mode: 0644]
web/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestUpdate.php [deleted file]
web/core/modules/system/tests/modules/entity_test_update/entity_test_update.module
web/core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php
web/core/modules/system/tests/src/Functional/Database/DatabaseTestBase.php [new file with mode: 0644]
web/core/modules/system/tests/src/Functional/Database/FakeRecord.php [new file with mode: 0644]
web/core/modules/system/tests/src/Functional/Database/SelectPagerDefaultTest.php [moved from web/core/modules/system/src/Tests/Database/SelectPagerDefaultTest.php with 89% similarity]
web/core/modules/system/tests/src/Functional/Database/SelectTableSortDefaultTest.php [moved from web/core/modules/system/src/Tests/Database/SelectTableSortDefaultTest.php with 85% similarity]
web/core/modules/system/tests/src/Functional/Database/TemporaryQueryTest.php [moved from web/core/modules/system/src/Tests/Database/TemporaryQueryTest.php with 90% similarity]
web/core/modules/system/tests/src/Functional/DrupalKernel/ContainerRebuildWebTest.php [moved from web/core/modules/system/src/Tests/DrupalKernel/ContainerRebuildWebTest.php with 63% similarity]
web/core/modules/taxonomy/migration_templates/d6_taxonomy_term_translation.yml [new file with mode: 0644]
web/core/modules/taxonomy/migration_templates/d6_taxonomy_vocabulary_translation.yml [new file with mode: 0644]
web/core/modules/taxonomy/src/Plugin/migrate/source/d6/Term.php
web/core/modules/taxonomy/src/Plugin/migrate/source/d6/VocabularyTranslation.php [new file with mode: 0644]
web/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php
web/core/modules/taxonomy/src/Tests/TaxonomyTestTrait.php
web/core/modules/taxonomy/src/Tests/TaxonomyTranslationTestTrait.php
web/core/modules/taxonomy/tests/src/Functional/TaxonomyImageTest.php [moved from web/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php with 94% similarity]
web/core/modules/taxonomy/tests/src/Functional/TaxonomyQueryAlterTest.php [moved from web/core/modules/taxonomy/src/Tests/TaxonomyQueryAlterTest.php with 97% similarity]
web/core/modules/taxonomy/tests/src/Functional/TaxonomyTermPagerTest.php [moved from web/core/modules/taxonomy/src/Tests/TaxonomyTermPagerTest.php with 97% similarity]
web/core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php
web/core/modules/taxonomy/tests/src/Functional/TaxonomyTestTrait.php [new file with mode: 0644]
web/core/modules/taxonomy/tests/src/Functional/TaxonomyTranslationTestTrait.php [new file with mode: 0644]
web/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php
web/core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php [moved from web/core/modules/taxonomy/src/Tests/TermTranslationUITest.php with 97% similarity]
web/core/modules/taxonomy/tests/src/Functional/ThemeTest.php [moved from web/core/modules/taxonomy/src/Tests/ThemeTest.php with 97% similarity]
web/core/modules/taxonomy/tests/src/Functional/Views/ArgumentValidatorTermTest.php [moved from web/core/modules/taxonomy/src/Tests/Views/ArgumentValidatorTermTest.php with 96% similarity]
web/core/modules/taxonomy/tests/src/Functional/Views/RelationshipNodeTermDataTest.php [moved from web/core/modules/taxonomy/src/Tests/Views/RelationshipNodeTermDataTest.php with 97% similarity]
web/core/modules/taxonomy/tests/src/Functional/Views/RelationshipRepresentativeNodeTest.php [moved from web/core/modules/taxonomy/src/Tests/Views/RelationshipRepresentativeNodeTest.php with 94% similarity]
web/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyDefaultArgumentTest.php [moved from web/core/modules/taxonomy/src/Tests/Views/TaxonomyDefaultArgumentTest.php with 98% similarity]
web/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldAllTermsTest.php [moved from web/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldAllTermsTest.php with 86% similarity]
web/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php [moved from web/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldFilterTest.php with 96% similarity]
web/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldTidTest.php [moved from web/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldTidTest.php with 94% similarity]
web/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidFilterTest.php [moved from web/core/modules/taxonomy/src/Tests/Views/TaxonomyIndexTidFilterTest.php with 97% similarity]
web/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php [moved from web/core/modules/taxonomy/src/Tests/Views/TaxonomyIndexTidUiTest.php with 96% similarity]
web/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyParentUITest.php [moved from web/core/modules/taxonomy/src/Tests/Views/TaxonomyParentUITest.php with 81% similarity]
web/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyRelationshipTest.php [moved from web/core/modules/taxonomy/src/Tests/Views/TaxonomyRelationshipTest.php with 96% similarity]
web/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentDepthTest.php [moved from web/core/modules/taxonomy/src/Tests/Views/TaxonomyTermArgumentDepthTest.php with 89% similarity]
web/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermFilterDepthTest.php [moved from web/core/modules/taxonomy/src/Tests/Views/TaxonomyTermFilterDepthTest.php with 96% similarity]
web/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermViewTest.php [moved from web/core/modules/taxonomy/src/Tests/Views/TaxonomyTermViewTest.php with 97% similarity]
web/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php [moved from web/core/modules/taxonomy/src/Tests/Views/TaxonomyTestBase.php with 97% similarity]
web/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyVocabularyArgumentTest.php [moved from web/core/modules/taxonomy/src/Tests/Views/TaxonomyVocabularyArgumentTest.php with 92% similarity]
web/core/modules/taxonomy/tests/src/Functional/Views/TermNameFieldTest.php [moved from web/core/modules/taxonomy/src/Tests/Views/TermNameFieldTest.php with 96% similarity]
web/core/modules/taxonomy/tests/src/Functional/VocabularyUiTest.php [moved from web/core/modules/taxonomy/src/Tests/VocabularyUiTest.php with 97% similarity]
web/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTest.php
web/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTranslationTest.php [new file with mode: 0644]
web/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php [new file with mode: 0644]
web/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTranslationTest.php [new file with mode: 0644]
web/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTranslationTest.php [new file with mode: 0644]
web/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php
web/core/modules/update/src/Tests/UpdateTestBase.php
web/core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php [moved from web/core/modules/update/src/Tests/FileTransferAuthorizeFormTest.php with 92% similarity]
web/core/modules/update/tests/src/Functional/UpdateContribTest.php [moved from web/core/modules/update/src/Tests/UpdateContribTest.php with 99% similarity]
web/core/modules/update/tests/src/Functional/UpdateCoreTest.php [moved from web/core/modules/update/src/Tests/UpdateCoreTest.php with 98% similarity]
web/core/modules/update/tests/src/Functional/UpdateDeleteFileIfStaleTest.php [moved from web/core/modules/update/src/Tests/UpdateDeleteFileIfStaleTest.php with 96% similarity]
web/core/modules/update/tests/src/Functional/UpdateTestBase.php [new file with mode: 0644]
web/core/modules/update/tests/src/Functional/UpdateUploadTest.php [moved from web/core/modules/update/src/Tests/UpdateUploadTest.php with 96% similarity]
web/core/modules/user/src/UserData.php
web/core/modules/user/tests/src/Functional/AccessRoleUITest.php [moved from web/core/modules/user/src/Tests/Views/AccessRoleUITest.php with 88% similarity]
web/core/modules/user/tests/src/Functional/UserLoginHttpTest.php
web/core/modules/user/tests/src/Unit/Plugin/Action/AddRoleUserTest.php
web/core/modules/views/src/Controller/ViewAjaxController.php
web/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
web/core/modules/views/src/Plugin/views/style/DefaultStyle.php
web/core/modules/views/src/Plugin/views/style/Grid.php
web/core/modules/views/src/Plugin/views/style/HtmlList.php
web/core/modules/views/src/Plugin/views/style/Opml.php
web/core/modules/views/src/Plugin/views/style/Rss.php
web/core/modules/views/src/Plugin/views/style/StylePluginBase.php
web/core/modules/views/src/Plugin/views/style/Table.php
web/core/modules/views/src/Tests/ViewAjaxTest.php
web/core/modules/views/tests/modules/views_test_data/src/Plugin/views/style/StyleTemplateTest.php
web/core/modules/views/tests/modules/views_test_data/src/Plugin/views/style/StyleTest.php
web/core/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php
web/core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php
web/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php
web/core/modules/views_ui/src/Tests/PreviewTest.php
web/core/modules/views_ui/src/Tests/UITestBase.php
web/core/modules/views_ui/src/Tests/ViewEditTest.php
web/core/modules/views_ui/src/ViewEditForm.php
web/core/modules/views_ui/src/ViewUI.php
web/core/modules/views_ui/tests/src/Functional/AnalyzeTest.php [moved from web/core/modules/views_ui/src/Tests/AnalyzeTest.php with 70% similarity]
web/core/modules/views_ui/tests/src/Functional/AreaEntityUITest.php [moved from web/core/modules/views_ui/src/Tests/AreaEntityUITest.php with 93% similarity]
web/core/modules/views_ui/tests/src/Functional/ArgumentValidatorTest.php [moved from web/core/modules/views_ui/src/Tests/ArgumentValidatorTest.php with 97% similarity]
web/core/modules/views_ui/tests/src/Functional/CachedDataUITest.php [moved from web/core/modules/views_ui/src/Tests/CachedDataUITest.php with 98% similarity]
web/core/modules/views_ui/tests/src/Functional/CustomBooleanTest.php [moved from web/core/modules/views_ui/src/Tests/CustomBooleanTest.php with 97% similarity]
web/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php [moved from web/core/modules/views_ui/src/Tests/DefaultViewsTest.php with 96% similarity]
web/core/modules/views_ui/tests/src/Functional/DisplayAttachmentTest.php [moved from web/core/modules/views_ui/src/Tests/DisplayAttachmentTest.php with 95% similarity]
web/core/modules/views_ui/tests/src/Functional/DisplayCRUDTest.php [moved from web/core/modules/views_ui/src/Tests/DisplayCRUDTest.php with 99% similarity]
web/core/modules/views_ui/tests/src/Functional/DisplayExtenderUITest.php [moved from web/core/modules/views_ui/src/Tests/DisplayExtenderUITest.php with 97% similarity]
web/core/modules/views_ui/tests/src/Functional/DisplayFeedTest.php [moved from web/core/modules/views_ui/src/Tests/DisplayFeedTest.php with 92% similarity]
web/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php [moved from web/core/modules/views_ui/src/Tests/DisplayPathTest.php with 94% similarity]
web/core/modules/views_ui/tests/src/Functional/DisplayTest.php [moved from web/core/modules/views_ui/src/Tests/DisplayTest.php with 77% similarity]
web/core/modules/views_ui/tests/src/Functional/DuplicateTest.php [moved from web/core/modules/views_ui/src/Tests/DuplicateTest.php with 84% similarity]
web/core/modules/views_ui/tests/src/Functional/FieldUITest.php [moved from web/core/modules/views_ui/src/Tests/FieldUITest.php with 87% similarity]
web/core/modules/views_ui/tests/src/Functional/FilterBooleanWebTest.php [moved from web/core/modules/views_ui/src/Tests/FilterBooleanWebTest.php with 89% similarity]
web/core/modules/views_ui/tests/src/Functional/FilterNumericWebTest.php [moved from web/core/modules/views_ui/src/Tests/FilterNumericWebTest.php with 86% similarity]
web/core/modules/views_ui/tests/src/Functional/FilterUITest.php [moved from web/core/modules/views_ui/src/Tests/FilterUITest.php with 94% similarity]
web/core/modules/views_ui/tests/src/Functional/GroupByTest.php [moved from web/core/modules/views_ui/src/Tests/GroupByTest.php with 97% similarity]
web/core/modules/views_ui/tests/src/Functional/HandlerTest.php [moved from web/core/modules/views_ui/src/Tests/HandlerTest.php with 96% similarity]
web/core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php [moved from web/core/modules/views_ui/src/Tests/NewViewConfigSchemaTest.php with 90% similarity]
web/core/modules/views_ui/tests/src/Functional/OverrideDisplaysTest.php [moved from web/core/modules/views_ui/src/Tests/OverrideDisplaysTest.php with 97% similarity]
web/core/modules/views_ui/tests/src/Functional/QueryTest.php [moved from web/core/modules/views_ui/src/Tests/QueryTest.php with 96% similarity]
web/core/modules/views_ui/tests/src/Functional/RearrangeFieldsTest.php [moved from web/core/modules/views_ui/src/Tests/RearrangeFieldsTest.php with 98% similarity]
web/core/modules/views_ui/tests/src/Functional/RedirectTest.php [moved from web/core/modules/views_ui/src/Tests/RedirectTest.php with 97% similarity]
web/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php [moved from web/core/modules/views_ui/src/Tests/ReportFieldsTest.php with 97% similarity]
web/core/modules/views_ui/tests/src/Functional/ReportTest.php [moved from web/core/modules/views_ui/src/Tests/ReportTest.php with 72% similarity]
web/core/modules/views_ui/tests/src/Functional/SettingsTest.php [moved from web/core/modules/views_ui/src/Tests/SettingsTest.php with 91% similarity]
web/core/modules/views_ui/tests/src/Functional/StorageTest.php [moved from web/core/modules/views_ui/src/Tests/StorageTest.php with 96% similarity]
web/core/modules/views_ui/tests/src/Functional/StyleTableTest.php [moved from web/core/modules/views_ui/src/Tests/StyleTableTest.php with 95% similarity]
web/core/modules/views_ui/tests/src/Functional/StyleUITest.php [moved from web/core/modules/views_ui/src/Tests/StyleUITest.php with 98% similarity]
web/core/modules/views_ui/tests/src/Functional/TokenizeAreaUITest.php [moved from web/core/modules/views_ui/src/Tests/TokenizeAreaUITest.php with 96% similarity]
web/core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php [moved from web/core/modules/views_ui/src/Tests/TranslatedViewTest.php with 90% similarity]
web/core/modules/views_ui/tests/src/Functional/UITestBase.php [new file with mode: 0644]
web/core/modules/views_ui/tests/src/Functional/UnsavedPreviewTest.php [moved from web/core/modules/views_ui/src/Tests/UnsavedPreviewTest.php with 92% similarity]
web/core/modules/views_ui/tests/src/Functional/ViewsListTest.php [moved from web/core/modules/views_ui/src/Tests/ViewsListTest.php with 89% similarity]
web/core/modules/views_ui/tests/src/Functional/WizardTest.php [moved from web/core/modules/views_ui/src/Tests/WizardTest.php with 96% similarity]
web/core/modules/views_ui/tests/src/Functional/XssTest.php [moved from web/core/modules/views_ui/src/Tests/XssTest.php with 96% similarity]
web/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php [new file with mode: 0644]
web/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
web/core/tests/Drupal/FunctionalTests/Image/ToolkitSetupFormTest.php [moved from web/core/modules/system/src/Tests/Image/ToolkitSetupFormTest.php with 94% similarity]
web/core/tests/Drupal/FunctionalTests/Image/ToolkitTest.php [moved from web/core/modules/system/src/Tests/Image/ToolkitTest.php with 98% similarity]
web/core/tests/Drupal/FunctionalTests/Image/ToolkitTestBase.php [new file with mode: 0644]
web/core/tests/Drupal/KernelTests/Core/Database/FetchTest.php
web/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php
web/core/tests/Drupal/KernelTests/Core/Path/AliasTest.php
web/core/tests/Drupal/KernelTests/KernelTestBaseTest.php
web/core/tests/Drupal/Tests/Core/Block/BlockManagerTest.php [new file with mode: 0644]
web/core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php
web/core/tests/Drupal/Tests/TestSuites/TestSuiteBaseTest.php

index 9ca54eb8191976b8f02f1c293a93fc9bdd1ec557..ec4a0f43c64311cbe478be938e746ee3c169ea36 100644 (file)
         },
         {
             "name": "drupal/core",
-            "version": "8.3.4",
+            "version": "8.3.7",
             "source": {
                 "type": "git",
                 "url": "https://github.com/drupal/core.git",
-                "reference": "f34eee7255142ab5416107972ef13d011f11e163"
+                "reference": "32f66ed9cc593f8e9ab0eaaaeff4cadbd859d5ff"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/drupal/core/zipball/f34eee7255142ab5416107972ef13d011f11e163",
-                "reference": "f34eee7255142ab5416107972ef13d011f11e163",
+                "url": "https://api.github.com/repos/drupal/core/zipball/32f66ed9cc593f8e9ab0eaaaeff4cadbd859d5ff",
+                "reference": "32f66ed9cc593f8e9ab0eaaaeff4cadbd859d5ff",
                 "shasum": ""
             },
             "require": {
                 "GPL-2.0+"
             ],
             "description": "Drupal is an open source content management platform powering millions of websites and applications.",
-            "time": "2017-06-21T18:13:27+00:00"
+            "time": "2017-08-16T17:10:35+00:00"
         },
         {
             "name": "drupal/crop",
             "homepage": "https://www.drupal.org/project/security_review",
             "support": {
                 "source": "http://cgit.drupalcode.org/security_review"
-            },
-            "time": "2016-10-20 15:43:48"
+            }
         },
         {
             "name": "drupal/simple_sitemap",
                 "standards",
                 "syntax"
             ],
-            "time": "2015-09-20 22:14:29"
+            "time": "2015-09-20T22:14:29+00:00"
         },
         {
             "name": "guzzlehttp/guzzle",
index e44722e933f8ebf9b4501f04b42c9accc594ab00..fc46f0e003d0490f016716111879b4952a9624ae 100755 (executable)
Binary files a/composer.phar and b/composer.phar differ
index 048ac50bbdbc8e5978caa229a34d29f0ac74bd7a..6e357d5ee83eb789582ecb43266dd795d2a31992 100644 (file)
             "source": "http://cgit.drupalcode.org/layouter"
         }
     },
-    {
-        "name": "drupal/core",
-        "version": "8.3.4",
-        "version_normalized": "8.3.4.0",
-        "source": {
-            "type": "git",
-            "url": "https://github.com/drupal/core.git",
-            "reference": "f34eee7255142ab5416107972ef13d011f11e163"
-        },
-        "dist": {
-            "type": "zip",
-            "url": "https://api.github.com/repos/drupal/core/zipball/f34eee7255142ab5416107972ef13d011f11e163",
-            "reference": "f34eee7255142ab5416107972ef13d011f11e163",
-            "shasum": ""
-        },
-        "require": {
-            "asm89/stack-cors": "~1.0",
-            "composer/semver": "~1.0",
-            "doctrine/annotations": "1.2.*",
-            "doctrine/common": "^2.5",
-            "easyrdf/easyrdf": "0.9.*",
-            "egulias/email-validator": "1.2.*",
-            "guzzlehttp/guzzle": "^6.2.1",
-            "masterminds/html5": "~2.1",
-            "paragonie/random_compat": "^1.0|^2.0",
-            "php": ">=5.5.9",
-            "stack/builder": "1.0.*",
-            "symfony-cmf/routing": "~1.4",
-            "symfony/class-loader": "~2.8",
-            "symfony/console": "~2.8",
-            "symfony/dependency-injection": "~2.8",
-            "symfony/event-dispatcher": "~2.8",
-            "symfony/http-foundation": "~2.8",
-            "symfony/http-kernel": "~2.8",
-            "symfony/polyfill-iconv": "~1.0",
-            "symfony/process": "~2.8",
-            "symfony/psr-http-message-bridge": "^1.0",
-            "symfony/routing": "~2.8",
-            "symfony/serializer": "~2.8",
-            "symfony/translation": "~2.8",
-            "symfony/validator": "~2.8",
-            "symfony/yaml": "~2.8",
-            "twig/twig": "^1.23.1",
-            "zendframework/zend-diactoros": "~1.1",
-            "zendframework/zend-feed": "~2.4"
-        },
-        "conflict": {
-            "drush/drush": "<8.1.10"
-        },
-        "replace": {
-            "drupal/action": "self.version",
-            "drupal/aggregator": "self.version",
-            "drupal/automated_cron": "self.version",
-            "drupal/ban": "self.version",
-            "drupal/bartik": "self.version",
-            "drupal/basic_auth": "self.version",
-            "drupal/big_pipe": "self.version",
-            "drupal/block": "self.version",
-            "drupal/block_content": "self.version",
-            "drupal/block_place": "self.version",
-            "drupal/book": "self.version",
-            "drupal/breakpoint": "self.version",
-            "drupal/ckeditor": "self.version",
-            "drupal/classy": "self.version",
-            "drupal/color": "self.version",
-            "drupal/comment": "self.version",
-            "drupal/config": "self.version",
-            "drupal/config_translation": "self.version",
-            "drupal/contact": "self.version",
-            "drupal/content_moderation": "self.version",
-            "drupal/content_translation": "self.version",
-            "drupal/contextual": "self.version",
-            "drupal/core-annotation": "self.version",
-            "drupal/core-assertion": "self.version",
-            "drupal/core-bridge": "self.version",
-            "drupal/core-datetime": "self.version",
-            "drupal/core-dependency-injection": "self.version",
-            "drupal/core-diff": "self.version",
-            "drupal/core-discovery": "self.version",
-            "drupal/core-event-dispatcher": "self.version",
-            "drupal/core-file-cache": "self.version",
-            "drupal/core-filesystem": "self.version",
-            "drupal/core-gettext": "self.version",
-            "drupal/core-graph": "self.version",
-            "drupal/core-http-foundation": "self.version",
-            "drupal/core-php-storage": "self.version",
-            "drupal/core-plugin": "self.version",
-            "drupal/core-proxy-builder": "self.version",
-            "drupal/core-render": "self.version",
-            "drupal/core-serialization": "self.version",
-            "drupal/core-transliteration": "self.version",
-            "drupal/core-utility": "self.version",
-            "drupal/core-uuid": "self.version",
-            "drupal/datetime": "self.version",
-            "drupal/datetime_range": "self.version",
-            "drupal/dblog": "self.version",
-            "drupal/dynamic_page_cache": "self.version",
-            "drupal/editor": "self.version",
-            "drupal/entity_reference": "self.version",
-            "drupal/field": "self.version",
-            "drupal/field_layout": "self.version",
-            "drupal/field_ui": "self.version",
-            "drupal/file": "self.version",
-            "drupal/filter": "self.version",
-            "drupal/forum": "self.version",
-            "drupal/hal": "self.version",
-            "drupal/help": "self.version",
-            "drupal/history": "self.version",
-            "drupal/image": "self.version",
-            "drupal/inline_form_errors": "self.version",
-            "drupal/language": "self.version",
-            "drupal/layout_discovery": "self.version",
-            "drupal/link": "self.version",
-            "drupal/locale": "self.version",
-            "drupal/menu_link_content": "self.version",
-            "drupal/menu_ui": "self.version",
-            "drupal/migrate": "self.version",
-            "drupal/migrate_drupal": "self.version",
-            "drupal/migrate_drupal_ui": "self.version",
-            "drupal/minimal": "self.version",
-            "drupal/node": "self.version",
-            "drupal/options": "self.version",
-            "drupal/outside_in": "self.version",
-            "drupal/page_cache": "self.version",
-            "drupal/path": "self.version",
-            "drupal/quickedit": "self.version",
-            "drupal/rdf": "self.version",
-            "drupal/responsive_image": "self.version",
-            "drupal/rest": "self.version",
-            "drupal/search": "self.version",
-            "drupal/serialization": "self.version",
-            "drupal/seven": "self.version",
-            "drupal/shortcut": "self.version",
-            "drupal/simpletest": "self.version",
-            "drupal/standard": "self.version",
-            "drupal/stark": "self.version",
-            "drupal/statistics": "self.version",
-            "drupal/syslog": "self.version",
-            "drupal/system": "self.version",
-            "drupal/taxonomy": "self.version",
-            "drupal/telephone": "self.version",
-            "drupal/text": "self.version",
-            "drupal/toolbar": "self.version",
-            "drupal/tour": "self.version",
-            "drupal/tracker": "self.version",
-            "drupal/update": "self.version",
-            "drupal/user": "self.version",
-            "drupal/views": "self.version",
-            "drupal/views_ui": "self.version",
-            "drupal/workflows": "self.version"
-        },
-        "require-dev": {
-            "behat/mink": "1.7.x-dev",
-            "behat/mink-goutte-driver": "~1.2",
-            "drupal/coder": "8.2.12",
-            "jcalderonzumba/gastonjs": "~1.0.2",
-            "jcalderonzumba/mink-phantomjs-driver": "~0.3.1",
-            "mikey179/vfsstream": "~1.2",
-            "phpunit/phpunit": ">=4.8.28 <5",
-            "symfony/browser-kit": ">=2.8.13 <3.0",
-            "symfony/css-selector": "~2.8"
-        },
-        "time": "2017-06-21T18:13:27+00:00",
-        "type": "drupal-core",
-        "installation-source": "dist",
-        "autoload": {
-            "psr-4": {
-                "Drupal\\Core\\": "lib/Drupal/Core",
-                "Drupal\\Component\\": "lib/Drupal/Component",
-                "Drupal\\Driver\\": "../drivers/lib/Drupal/Driver"
-            },
-            "classmap": [
-                "lib/Drupal.php",
-                "lib/Drupal/Component/Utility/Timer.php",
-                "lib/Drupal/Component/Utility/Unicode.php",
-                "lib/Drupal/Core/Database/Database.php",
-                "lib/Drupal/Core/DrupalKernel.php",
-                "lib/Drupal/Core/DrupalKernelInterface.php",
-                "lib/Drupal/Core/Site/Settings.php"
-            ]
-        },
-        "notification-url": "https://packagist.org/downloads/",
-        "license": [
-            "GPL-2.0+"
-        ],
-        "description": "Drupal is an open source content management platform powering millions of websites and applications."
-    },
     {
         "name": "drupal-composer/drupal-scaffold",
         "version": "2.3.0",
             }
         ],
         "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it"
+    },
+    {
+        "name": "drupal/core",
+        "version": "8.3.7",
+        "version_normalized": "8.3.7.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/drupal/core.git",
+            "reference": "32f66ed9cc593f8e9ab0eaaaeff4cadbd859d5ff"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/drupal/core/zipball/32f66ed9cc593f8e9ab0eaaaeff4cadbd859d5ff",
+            "reference": "32f66ed9cc593f8e9ab0eaaaeff4cadbd859d5ff",
+            "shasum": ""
+        },
+        "require": {
+            "asm89/stack-cors": "~1.0",
+            "composer/semver": "~1.0",
+            "doctrine/annotations": "1.2.*",
+            "doctrine/common": "^2.5",
+            "easyrdf/easyrdf": "0.9.*",
+            "egulias/email-validator": "1.2.*",
+            "guzzlehttp/guzzle": "^6.2.1",
+            "masterminds/html5": "~2.1",
+            "paragonie/random_compat": "^1.0|^2.0",
+            "php": ">=5.5.9",
+            "stack/builder": "1.0.*",
+            "symfony-cmf/routing": "~1.4",
+            "symfony/class-loader": "~2.8",
+            "symfony/console": "~2.8",
+            "symfony/dependency-injection": "~2.8",
+            "symfony/event-dispatcher": "~2.8",
+            "symfony/http-foundation": "~2.8",
+            "symfony/http-kernel": "~2.8",
+            "symfony/polyfill-iconv": "~1.0",
+            "symfony/process": "~2.8",
+            "symfony/psr-http-message-bridge": "^1.0",
+            "symfony/routing": "~2.8",
+            "symfony/serializer": "~2.8",
+            "symfony/translation": "~2.8",
+            "symfony/validator": "~2.8",
+            "symfony/yaml": "~2.8",
+            "twig/twig": "^1.23.1",
+            "zendframework/zend-diactoros": "~1.1",
+            "zendframework/zend-feed": "~2.4"
+        },
+        "conflict": {
+            "drush/drush": "<8.1.10"
+        },
+        "replace": {
+            "drupal/action": "self.version",
+            "drupal/aggregator": "self.version",
+            "drupal/automated_cron": "self.version",
+            "drupal/ban": "self.version",
+            "drupal/bartik": "self.version",
+            "drupal/basic_auth": "self.version",
+            "drupal/big_pipe": "self.version",
+            "drupal/block": "self.version",
+            "drupal/block_content": "self.version",
+            "drupal/block_place": "self.version",
+            "drupal/book": "self.version",
+            "drupal/breakpoint": "self.version",
+            "drupal/ckeditor": "self.version",
+            "drupal/classy": "self.version",
+            "drupal/color": "self.version",
+            "drupal/comment": "self.version",
+            "drupal/config": "self.version",
+            "drupal/config_translation": "self.version",
+            "drupal/contact": "self.version",
+            "drupal/content_moderation": "self.version",
+            "drupal/content_translation": "self.version",
+            "drupal/contextual": "self.version",
+            "drupal/core-annotation": "self.version",
+            "drupal/core-assertion": "self.version",
+            "drupal/core-bridge": "self.version",
+            "drupal/core-datetime": "self.version",
+            "drupal/core-dependency-injection": "self.version",
+            "drupal/core-diff": "self.version",
+            "drupal/core-discovery": "self.version",
+            "drupal/core-event-dispatcher": "self.version",
+            "drupal/core-file-cache": "self.version",
+            "drupal/core-filesystem": "self.version",
+            "drupal/core-gettext": "self.version",
+            "drupal/core-graph": "self.version",
+            "drupal/core-http-foundation": "self.version",
+            "drupal/core-php-storage": "self.version",
+            "drupal/core-plugin": "self.version",
+            "drupal/core-proxy-builder": "self.version",
+            "drupal/core-render": "self.version",
+            "drupal/core-serialization": "self.version",
+            "drupal/core-transliteration": "self.version",
+            "drupal/core-utility": "self.version",
+            "drupal/core-uuid": "self.version",
+            "drupal/datetime": "self.version",
+            "drupal/datetime_range": "self.version",
+            "drupal/dblog": "self.version",
+            "drupal/dynamic_page_cache": "self.version",
+            "drupal/editor": "self.version",
+            "drupal/entity_reference": "self.version",
+            "drupal/field": "self.version",
+            "drupal/field_layout": "self.version",
+            "drupal/field_ui": "self.version",
+            "drupal/file": "self.version",
+            "drupal/filter": "self.version",
+            "drupal/forum": "self.version",
+            "drupal/hal": "self.version",
+            "drupal/help": "self.version",
+            "drupal/history": "self.version",
+            "drupal/image": "self.version",
+            "drupal/inline_form_errors": "self.version",
+            "drupal/language": "self.version",
+            "drupal/layout_discovery": "self.version",
+            "drupal/link": "self.version",
+            "drupal/locale": "self.version",
+            "drupal/menu_link_content": "self.version",
+            "drupal/menu_ui": "self.version",
+            "drupal/migrate": "self.version",
+            "drupal/migrate_drupal": "self.version",
+            "drupal/migrate_drupal_ui": "self.version",
+            "drupal/minimal": "self.version",
+            "drupal/node": "self.version",
+            "drupal/options": "self.version",
+            "drupal/outside_in": "self.version",
+            "drupal/page_cache": "self.version",
+            "drupal/path": "self.version",
+            "drupal/quickedit": "self.version",
+            "drupal/rdf": "self.version",
+            "drupal/responsive_image": "self.version",
+            "drupal/rest": "self.version",
+            "drupal/search": "self.version",
+            "drupal/serialization": "self.version",
+            "drupal/seven": "self.version",
+            "drupal/shortcut": "self.version",
+            "drupal/simpletest": "self.version",
+            "drupal/standard": "self.version",
+            "drupal/stark": "self.version",
+            "drupal/statistics": "self.version",
+            "drupal/syslog": "self.version",
+            "drupal/system": "self.version",
+            "drupal/taxonomy": "self.version",
+            "drupal/telephone": "self.version",
+            "drupal/text": "self.version",
+            "drupal/toolbar": "self.version",
+            "drupal/tour": "self.version",
+            "drupal/tracker": "self.version",
+            "drupal/update": "self.version",
+            "drupal/user": "self.version",
+            "drupal/views": "self.version",
+            "drupal/views_ui": "self.version",
+            "drupal/workflows": "self.version"
+        },
+        "require-dev": {
+            "behat/mink": "1.7.x-dev",
+            "behat/mink-goutte-driver": "~1.2",
+            "drupal/coder": "8.2.12",
+            "jcalderonzumba/gastonjs": "~1.0.2",
+            "jcalderonzumba/mink-phantomjs-driver": "~0.3.1",
+            "mikey179/vfsstream": "~1.2",
+            "phpunit/phpunit": ">=4.8.28 <5",
+            "symfony/browser-kit": ">=2.8.13 <3.0",
+            "symfony/css-selector": "~2.8"
+        },
+        "time": "2017-08-16T17:10:35+00:00",
+        "type": "drupal-core",
+        "installation-source": "dist",
+        "autoload": {
+            "psr-4": {
+                "Drupal\\Core\\": "lib/Drupal/Core",
+                "Drupal\\Component\\": "lib/Drupal/Component",
+                "Drupal\\Driver\\": "../drivers/lib/Drupal/Driver"
+            },
+            "classmap": [
+                "lib/Drupal.php",
+                "lib/Drupal/Component/Utility/Timer.php",
+                "lib/Drupal/Component/Utility/Unicode.php",
+                "lib/Drupal/Core/Database/Database.php",
+                "lib/Drupal/Core/DrupalKernel.php",
+                "lib/Drupal/Core/DrupalKernelInterface.php",
+                "lib/Drupal/Core/Site/Settings.php"
+            ]
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "GPL-2.0+"
+        ],
+        "description": "Drupal is an open source content management platform powering millions of websites and applications."
     }
 ]
index eab9019968275d313697d6d82732f70a243e5961..1cfd863cf52ce6ab6d7ec539c5be93c329f66e19 100644 (file)
@@ -1,3 +1,7 @@
+Drupal 8.3.7, 2017-08-16
+------------------------
+- Fixed security issues. See SA-CORE-2017-004.
+
 Drupal 8.3.4, 2017-06-21
 ------------------------
 - Fixed security issues. See SA-CORE-2017-003.
index 74ceed95d124a9dd61a7052990c716bc5076be00..5d5525b1af08c673422000b7cbac99cafd73eac5 100644 (file)
@@ -88,7 +88,7 @@ INSTALLATION
    directory within your web server's document root or your public HTML
    directory, continue with this command:
 
-     mv drupal-x.y.z/* drupal-x.y.z/.htaccess drupal-x.y.z/.csslintrc drupal-x.y.z/.editorconfig drupal-x.y.z/.eslintignore drupal-x.y.z/.eslintrc drupal-x.y.z/.gitattributes /path/to/your/installation
+     mv drupal-x.y.z/* drupal-x.y.z/.htaccess drupal-x.y.z/.csslintrc drupal-x.y.z/.editorconfig drupal-x.y.z/.eslintignore drupal-x.y.z/.eslintrc.json drupal-x.y.z/.gitattributes /path/to/your/installation
 
    You can also download the latest version of Drupal using Git on the command
    line and set up a repository by following the instructions at
index 9e9431638d2dd7a5474af49be7fc4a35c5fff56a..4e5f4e6197a0ee00aee0252f01d91800c75931e5 100644 (file)
@@ -36,6 +36,8 @@ Provisional membership:
   (Framework Manager - Frontend)
 - Gábor Hojtsy 'Gábor Hojtsy' https://www.drupal.org/u/gábor-hojtsy
   (Product Manager)
+- Lee Rowlands 'larowlan' https://www.drupal.org/u/larowlan
+  (Framework Manager)
 - Roy Scholten 'yoroy' https://www.drupal.org/u/yoroy
   (Product Manager)
 
@@ -168,10 +170,8 @@ CSS
 - John Albin Wilkins 'JohnAlbin' https://www.drupal.org/u/johnalbin
 
 Database API
-- Larry Garfield 'Crell' https://www.drupal.org/u/crell
 
   MySQL DB driver
-  - Larry Garfield 'Crell' https://www.drupal.org/u/crell
   - David Strauss 'David Strauss' https://www.drupal.org/u/david-strauss
 
   PostgreSQL DB driver
@@ -272,6 +272,17 @@ Mail
 Markup
 - ?
 
+Menu
+- Daniel Wehner 'dawehner' https://www.drupal.org/u/dawehner
+- Peter Wolanin 'pwolanin' https://www.drupal.org/u/pwolanin
+
+Menu Link Content
+- Daniel Wehner 'dawehner' https://www.drupal.org/u/dawehner
+- Peter Wolanin 'pwolanin' https://www.drupal.org/u/pwolanin
+
+Menu UI
+- ?
+
 Migrate
 - Adam Globus-Hoenich 'phenaproxima' https://www.drupal.org/u/phenaproxima
 - Ben Dougherty 'benjy' https://www.drupal.org/u/benjy
@@ -285,17 +296,6 @@ Migrate (Drupal)
 - Mike Ryan 'mikeryan' https://www.drupal.org/u/mikeryan
 - Vicki Spagnolo 'quietone' https://www.drupal.org/u/quietone
 
-Menu
-- Daniel Wehner 'dawehner' https://www.drupal.org/u/dawehner
-- Peter Wolanin 'pwolanin' https://www.drupal.org/u/pwolanin
-
-Menu Link Content
-- Daniel Wehner 'dawehner' https://www.drupal.org/u/dawehner
-- Peter Wolanin 'pwolanin' https://www.drupal.org/u/pwolanin
-
-Menu UI
-- ?
-
 Node
 - Tim Millwood 'timmillwood' https://www.drupal.org/u/timmillwood
 
@@ -337,10 +337,9 @@ Render API
 - Moshe Weitzman 'moshe weitzman' https://www.drupal.org/u/moshe-weitzman
 
 Request Processing
-- Larry Garfield 'Crell' https://www.drupal.org/u/crell
+- ?
 
 REST
-- Larry Garfield 'Crell' https://www.drupal.org/u/crell
 - Wim Leers 'Wim Leers' https://www.drupal.org/u/wim-leers
 
 Responsive Image
@@ -349,7 +348,6 @@ Responsive Image
 - Jelle Sebreghts 'Jelle_S' https://www.drupal.org/u/jelle_s
 
 Routing
-- Larry Garfield 'Crell' https://www.drupal.org/u/crell
 - Tim Plunkett 'tim.plunkett' https://www.drupal.org/u/tim.plunkett
 
 Search
@@ -432,6 +430,9 @@ Views
 - Jess Myrbo 'xjm' https://www.drupal.org/u/xjm
 - Len Swaneveld 'Lendude' https://www.drupal.org/u/lendude
 
+Workflows
+- Sam Becker 'Sam152' https://www.drupal.org/u/sam152
+
 Topic maintainers
 -----------------
 
index 7c4ebf40b11162d1513be64d7763ccfb974fc248..161ddb9146cf71fab28619561742a1fb094fd1f5 100644 (file)
@@ -2530,8 +2530,8 @@ function hook_validation_constraint_alter(array &$definitions) {
  *
  * @section sec_dispatch Dispatching events
  * To dispatch an event, call the
- * \Symfony\Component\EventDispatcher\EventDispatchInterface::dispatch() method
- * on the 'event_dispatcher' service (see the
+ * \Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch()
+ * method on the 'event_dispatcher' service (see the
  * @link container Services topic @endlink for more information about how to
  * interact with services). The first argument is the unique event name, which
  * you should normally define as a constant in a separate static class (see
index 2527845c752b8f751cf869cd90e076308734a8f4..bd2f2c1e70ab31050f31c10c9e5654f0a3ce56bd 100644 (file)
@@ -316,6 +316,7 @@ services:
       - { name: backend_overridable }
   # @deprecated in Drupal 8.0.x and will be removed before 9.0.0. Use
   #   config.storage.sync instead.
+  # @see https://www.drupal.org/node/2574957
   config.storage.staging:
     class: Drupal\Core\Config\FileStorage
     factory: Drupal\Core\Config\FileStorageFactory::getSync
index 45eaa3d8e40050237d047f3bb8ccb97d3e084c46..c69c588f0e2950463396b3b5936cbdf4bbd6c5a7 100644 (file)
@@ -531,24 +531,24 @@ function entity_get_display($entity_type, $bundle, $view_mode) {
  *
  * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0.
  *   If the entity form display is available in configuration use:
- * @code
- *   \Drupal::entityTypeManager()
- *     ->getStorage('entity_form_display')
- *     ->load($entity_type . '.' . $bundle . '.' . $form_mode);
- * @endcode
+ *   @code
+ *     \Drupal::entityTypeManager()
+ *       ->getStorage('entity_form_display')
+ *       ->load($entity_type . '.' . $bundle . '.' . $form_mode);
+ *   @endcode
  *   When the entity form display is not available in configuration, you can
  *   create a new EntityFormDisplay object using:
- * @code
- * $values = array(
- *  'targetEntityType' => $entity_type,
- *  'bundle' => $bundle,
- *  'mode' => $form_mode,
- *  'status' => TRUE,
- * );
- * \Drupal::entityTypeManager()
- *   ->getStorage('entity_form_display')
- *   ->create($values);
- * @endcode
+ *   @code
+ *   $values = array(
+ *    'targetEntityType' => $entity_type,
+ *    'bundle' => $bundle,
+ *    'mode' => $form_mode,
+ *    'status' => TRUE,
+ *   );
+ *   \Drupal::entityTypeManager()
+ *     ->getStorage('entity_form_display')
+ *     ->create($values);
+ *   @endcode
  *
  * @see \Drupal\Core\Entity\EntityStorageInterface::create()
  * @see \Drupal\Core\Entity\EntityStorageInterface::load()
index 9371f1e5f1c98d300780ffb4bbbffa60430d8c4e..db54df3d51785e14245d2dd9e990670e87ce30ff 100644 (file)
@@ -81,7 +81,7 @@ class Drupal {
   /**
    * The current system version.
    */
-  const VERSION = '8.3.4';
+  const VERSION = '8.3.7';
 
   /**
    * Core API compatibility.
index be35d96b4232a0e45ff76d713c7313557035006d..b2d00a3090154c6e4b0637b689672f4afda2a02e 100644 (file)
@@ -13,6 +13,8 @@ use Drupal\Component\Render\MarkupInterface;
  *   @link sanitization sanitization functions @endlink or the @link theme_render theme and render systems @endlink
  *   so that the output can can be themed, escaped, and altered properly.
  *
+ * @see https://www.drupal.org/node/2549395
+ *
  * @see TwigExtension::escapeFilter()
  * @see twig_render_template()
  * @see sanitization
@@ -34,6 +36,8 @@ class SafeMarkup {
    * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
    *   Instead, you should just check if a variable is an instance of
    *   \Drupal\Component\Render\MarkupInterface.
+   *
+   * @see https://www.drupal.org/node/2549395
    */
   public static function isSafe($string, $strategy = 'html') {
     return $string instanceof MarkupInterface;
@@ -58,6 +62,7 @@ class SafeMarkup {
    *   possible, \Drupal\Component\Utility\Html::escape() can be used in places
    *   where explicit escaping is needed.
    *
+   * @see https://www.drupal.org/node/2549395
    * @see drupal_validate_utf8()
    */
   public static function checkPlain($text) {
@@ -84,6 +89,8 @@ class SafeMarkup {
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
    *   Use \Drupal\Component\Render\FormattableMarkup.
+   *
+   * @see https://www.drupal.org/node/2549395
    */
   public static function format($string, array $args) {
     return new FormattableMarkup($string, $args);
index a837340a3c24c60bf2687694254b988181b6979f..30b52b612566e34ceab848513110697284912a71 100644 (file)
@@ -20,7 +20,6 @@ class BlockManager extends DefaultPluginManager implements BlockManagerInterface
 
   use CategorizingPluginManagerTrait {
     getSortedDefinitions as traitGetSortedDefinitions;
-    getGroupedDefinitions as traitGetGroupedDefinitions;
   }
   use ContextAwarePluginManagerTrait;
 
@@ -54,23 +53,13 @@ class BlockManager extends DefaultPluginManager implements BlockManagerInterface
    * {@inheritdoc}
    */
   public function getSortedDefinitions(array $definitions = NULL) {
-    // Sort the plugins first by category, then by label.
+    // Sort the plugins first by category, then by admin label.
     $definitions = $this->traitGetSortedDefinitions($definitions, 'admin_label');
     // Do not display the 'broken' plugin in the UI.
     unset($definitions['broken']);
     return $definitions;
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function getGroupedDefinitions(array $definitions = NULL) {
-    $definitions = $this->traitGetGroupedDefinitions($definitions, 'admin_label');
-    // Do not display the 'broken' plugin in the UI.
-    unset($definitions[$this->t('Block')]['broken']);
-    return $definitions;
-  }
-
   /**
    * {@inheritdoc}
    */
index acbbf006a05aa57e189e245c74091ff14675f116..b0c9f45b1923ab2e78fd511288614c1f4ff567f1 100644 (file)
@@ -246,6 +246,18 @@ abstract class CacheCollector implements CacheCollectorInterface, DestructableIn
         }
         $data = array_merge($cache->data, $data);
       }
+      elseif ($this->cacheCreated) {
+        // Getting here indicates that there was a cache entry at the
+        // beginning of the request, but now it's gone (some other process
+        // must have cleared it). We back out to prevent corrupting the cache
+        // with incomplete data, since we won't be able to properly merge
+        // the existing cache data from earlier with the new data.
+        // A future request will properly hydrate the cache from scratch.
+        if ($lock) {
+          $this->lock->release($lock_name);
+        }
+        return;
+      }
       // Remove keys marked for deletion.
       foreach ($this->keysToRemove as $delete_key) {
         unset($data[$delete_key]);
index aa5090a89a3f5aa3b1457b37f52f26c3c12751f4..221f0e2b49c80d94e03bc6dbad333455f7ecf124 100644 (file)
@@ -197,7 +197,7 @@ interface ConditionInterface {
    *
    * @param $conjunction
    *   - AND (default): this is the equivalent of andConditionGroup().
-   *   - OR: this is the equivalent of andConditionGroup().
+   *   - OR: this is the equivalent of orConditionGroup().
    *
    * @return \Drupal\Core\Database\Query\ConditionInterface
    *   An object holding a group of conditions.
index 3b16d1cddbc30021f65a7e433f4132a13bfe899b..ac364115ebd6a2dd1637bea9f77a8bb7e1e583fb 100644 (file)
@@ -66,7 +66,19 @@ class EntityAccessControlHandler extends EntityHandlerBase implements EntityAcce
       $operation = 'view';
     }
 
-    if (($return = $this->getCache($entity->uuid(), $operation, $langcode, $account)) !== NULL) {
+    // If an entity does not have a UUID, either from not being set or from not
+    // having them, use the 'entity type:ID' pattern as the cache $cid.
+    $cid = $entity->uuid() ?: $entity->getEntityTypeId() . ':' . $entity->id();
+
+    // If the entity is revisionable, then append the revision ID to allow
+    // individual revisions to have specific access control and be cached
+    // separately.
+    if ($entity instanceof RevisionableInterface) {
+      /** @var $entity \Drupal\Core\Entity\RevisionableInterface */
+      $cid .= ':' . $entity->getRevisionId();
+    }
+
+    if (($return = $this->getCache($cid, $operation, $langcode, $account)) !== NULL) {
       // Cache hit, no work necessary.
       return $return_as_object ? $return : $return->isAllowed();
     }
@@ -92,7 +104,7 @@ class EntityAccessControlHandler extends EntityHandlerBase implements EntityAcce
     if (!$return->isForbidden()) {
       $return = $return->orIf($this->checkAccess($entity, $operation, $account));
     }
-    $result = $this->setCache($return, $entity->uuid(), $operation, $langcode, $account);
+    $result = $this->setCache($return, $cid, $operation, $langcode, $account);
     return $return_as_object ? $result : $result->isAllowed();
   }
 
index fa2ddf8c7922e2a3ddfecf4e9a9f62ac3306ad4f..6f2ce7672ebed9183db9b3fc1921f1dd1ccc9602 100644 (file)
@@ -25,6 +25,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeManagerInterface::clearCachedDefinitions()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function clearCachedDefinitions() {
     $this->container->get('entity_type.manager')->clearCachedDefinitions();
@@ -41,6 +45,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeManagerInterface::getDefinition()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getDefinition($entity_type_id, $exception_on_invalid = TRUE) {
     return $this->container->get('entity_type.manager')->getDefinition($entity_type_id, $exception_on_invalid);
@@ -50,6 +58,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeManagerInterface::hasHandler()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function hasHandler($entity_type, $handler_type) {
     return $this->container->get('entity_type.manager')->hasHandler($entity_type, $handler_type);
@@ -59,6 +71,9 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeManagerInterface::getStorage() instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getStorage($entity_type) {
     return $this->container->get('entity_type.manager')->getStorage($entity_type);
@@ -68,6 +83,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeManagerInterface::getListBuilder()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getListBuilder($entity_type) {
     return $this->container->get('entity_type.manager')->getListBuilder($entity_type);
@@ -77,6 +96,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeManagerInterface::getFormObject()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getFormObject($entity_type, $operation) {
     return $this->container->get('entity_type.manager')->getFormObject($entity_type, $operation);
@@ -86,6 +109,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeManagerInterface::getRouteProviders()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getRouteProviders($entity_type) {
     return $this->container->get('entity_type.manager')->getRouteProviders($entity_type);
@@ -95,6 +122,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeManagerInterface::getViewBuilder()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getViewBuilder($entity_type) {
     return $this->container->get('entity_type.manager')->getViewBuilder($entity_type);
@@ -104,6 +135,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeManagerInterface::getAccessControlHandler()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getAccessControlHandler($entity_type) {
     return $this->container->get('entity_type.manager')->getAccessControlHandler($entity_type);
@@ -113,6 +148,9 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeManagerInterface::getHandler() instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getHandler($entity_type, $handler_type) {
     return $this->container->get('entity_type.manager')->getHandler($entity_type, $handler_type);
@@ -122,6 +160,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeManagerInterface::createHandlerInstance()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function createHandlerInstance($class, EntityTypeInterface $definition = NULL) {
     return $this->container->get('entity_type.manager')->createHandlerInstance($class, $definition);
@@ -131,6 +173,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityFieldManagerInterface::getBaseFieldDefinitions()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getBaseFieldDefinitions($entity_type_id) {
     return $this->container->get('entity_field.manager')->getBaseFieldDefinitions($entity_type_id);
@@ -140,6 +186,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityFieldManagerInterface::getFieldDefinitions()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getFieldDefinitions($entity_type_id, $bundle) {
     return $this->container->get('entity_field.manager')->getFieldDefinitions($entity_type_id, $bundle);
@@ -149,6 +199,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityFieldManagerInterface::getFieldStorageDefinitions()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getFieldStorageDefinitions($entity_type_id) {
     return $this->container->get('entity_field.manager')->getFieldStorageDefinitions($entity_type_id);
@@ -158,6 +212,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityFieldManagerInterface::setFieldMap()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function setFieldMap(array $field_map) {
     return $this->container->get('entity_field.manager')->setFieldMap($field_map);
@@ -167,6 +225,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityFieldManagerInterface::getFieldMap()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getFieldMap() {
     return $this->container->get('entity_field.manager')->getFieldMap();
@@ -176,6 +238,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityFieldManagerInterface::getFieldMapByFieldType()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getFieldMapByFieldType($field_type) {
     return $this->container->get('entity_field.manager')->getFieldMapByFieldType($field_type);
@@ -185,6 +251,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Field\FieldDefinitionListenerInterface::onFieldDefinitionCreate()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function onFieldDefinitionCreate(FieldDefinitionInterface $field_definition) {
     $this->container->get('field_definition.listener')->onFieldDefinitionCreate($field_definition);
@@ -194,6 +264,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Field\FieldDefinitionListenerInterface::onFieldDefinitionUpdate()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function onFieldDefinitionUpdate(FieldDefinitionInterface $field_definition, FieldDefinitionInterface $original) {
     $this->container->get('field_definition.listener')->onFieldDefinitionUpdate($field_definition, $original);
@@ -203,6 +277,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Field\FieldDefinitionListenerInterface::onFieldDefinitionDelete()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function onFieldDefinitionDelete(FieldDefinitionInterface $field_definition) {
     $this->container->get('field_definition.listener')->onFieldDefinitionDelete($field_definition);
@@ -212,6 +290,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityFieldManagerInterface::clearCachedFieldDefinitions()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function clearCachedFieldDefinitions() {
     $this->container->get('entity_field.manager')->clearCachedFieldDefinitions();
@@ -221,6 +303,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeBundleManagerInterface::clearCachedBundles()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function clearCachedBundles() {
     $this->container->get('entity_type.bundle.info')->clearCachedBundles();
@@ -230,6 +316,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeBundleManagerInterface::getBundleInfo()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getBundleInfo($entity_type) {
     return $this->container->get('entity_type.bundle.info')->getBundleInfo($entity_type);
@@ -239,6 +329,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeBundleManagerInterface::getAllBundleInfo()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getAllBundleInfo() {
     return $this->container->get('entity_type.bundle.info')->getAllBundleInfo();
@@ -255,6 +349,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeRepositoryInterface::getEntityTypeLabels()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getEntityTypeLabels($group = FALSE) {
     return $this->container->get('entity_type.repository')->getEntityTypeLabels($group);
@@ -264,6 +362,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityRepositoryInterface::getTranslationFromContext()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getTranslationFromContext(EntityInterface $entity, $langcode = NULL, $context = []) {
     return $this->container->get('entity.repository')->getTranslationFromContext($entity, $langcode, $context);
@@ -273,6 +375,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getAllViewModes()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getAllViewModes() {
     return $this->container->get('entity_display.repository')->getAllViewModes();
@@ -282,6 +388,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getViewModes()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getViewModes($entity_type_id) {
     return $this->container->get('entity_display.repository')->getViewModes($entity_type_id);
@@ -291,6 +401,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getAllFormModes()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getAllFormModes() {
     return $this->container->get('entity_display.repository')->getAllFormModes();
@@ -300,6 +414,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getFormModes()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getFormModes($entity_type_id) {
     return $this->container->get('entity_display.repository')->getFormModes($entity_type_id);
@@ -309,6 +427,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getViewModeOptions()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getViewModeOptions($entity_type_id) {
     return $this->container->get('entity_display.repository')->getViewModeOptions($entity_type_id);
@@ -318,6 +440,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getFormModeOptions()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getFormModeOptions($entity_type_id) {
     return $this->container->get('entity_display.repository')->getFormModeOptions($entity_type_id);
@@ -327,6 +453,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getViewModeOptionsByBundle()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getViewModeOptionsByBundle($entity_type_id, $bundle) {
     return $this->container->get('entity_display.repository')->getViewModeOptionsByBundle($entity_type_id, $bundle);
@@ -336,6 +466,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getFormModeOptionsByBundle()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getFormModeOptionsByBundle($entity_type_id, $bundle) {
     return $this->container->get('entity_display.repository')->getFormModeOptionsByBundle($entity_type_id, $bundle);
@@ -345,6 +479,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::clearDisplayModeInfo()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function clearDisplayModeInfo() {
     $this->container->get('entity_display.repository')->clearDisplayModeInfo();
@@ -354,6 +492,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityRepositoryInterface::loadEntityByUuid()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function loadEntityByUuid($entity_type_id, $uuid) {
     return $this->container->get('entity.repository')->loadEntityByUuid($entity_type_id, $uuid);
@@ -363,6 +505,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityRepositoryInterface::loadEntityByConfigTarget()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function loadEntityByConfigTarget($entity_type_id, $target) {
     return $this->container->get('entity.repository')->loadEntityByConfigTarget($entity_type_id, $target);
@@ -372,6 +518,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeRepositoryInterface::getEntityTypeFromClass()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getEntityTypeFromClass($class_name) {
     return $this->container->get('entity_type.repository')->getEntityTypeFromClass($class_name);
@@ -388,6 +538,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeListenerInterface::onEntityTypeUpdate()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function onEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeInterface $original) {
     $this->container->get('entity_type.listener')->onEntityTypeUpdate($entity_type, $original);
@@ -397,6 +551,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeListenerInterface::onEntityTypeDelete()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function onEntityTypeDelete(EntityTypeInterface $entity_type) {
     $this->container->get('entity_type.listener')->onEntityTypeDelete($entity_type);
@@ -406,6 +564,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Field\FieldStorageDefinitionListenerInterface::onFieldStorageDefinitionCreate()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface $storage_definition) {
     $this->container->get('field_storage_definition.listener')->onFieldStorageDefinitionCreate($storage_definition);
@@ -415,6 +577,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Field\FieldStorageDefinitionListenerInterface::onFieldStorageDefinitionUpdate()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function onFieldStorageDefinitionUpdate(FieldStorageDefinitionInterface $storage_definition, FieldStorageDefinitionInterface $original) {
     $this->container->get('field_storage_definition.listener')->onFieldStorageDefinitionUpdate($storage_definition, $original);
@@ -424,6 +590,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Field\FieldStorageDefinitionListenerInterface::onFieldStorageDefinitionDelete()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function onFieldStorageDefinitionDelete(FieldStorageDefinitionInterface $storage_definition) {
     $this->container->get('field_storage_definition.listener')->onFieldStorageDefinitionDelete($storage_definition);
@@ -433,6 +603,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityBundleListenerInterface::onBundleCreate()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function onBundleCreate($bundle, $entity_type_id) {
     $this->container->get('entity_bundle.listener')->onBundleCreate($bundle, $entity_type_id);
@@ -442,6 +616,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityBundleListenerInterface::onBundleDelete()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function onBundleDelete($bundle, $entity_type_id) {
     $this->container->get('entity_bundle.listener')->onBundleDelete($bundle, $entity_type_id);
@@ -451,6 +629,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface::getLastInstalledDefinition()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getLastInstalledDefinition($entity_type_id) {
     return $this->container->get('entity.last_installed_schema.repository')->getLastInstalledDefinition($entity_type_id);
@@ -471,6 +653,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface::getLastInstalledFieldStorageDefinitions()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getLastInstalledFieldStorageDefinitions($entity_type_id) {
     return $this->container->get('entity.last_installed_schema.repository')->getLastInstalledFieldStorageDefinitions($entity_type_id);
@@ -480,6 +666,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeManagerInterface::getDefinitions()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getDefinitions() {
     return $this->container->get('entity_type.manager')->getDefinitions();
@@ -489,6 +679,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeManagerInterface::hasDefinition()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function hasDefinition($plugin_id) {
     return $this->container->get('entity_type.manager')->hasDefinition($plugin_id);
@@ -498,6 +692,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeManagerInterface::createInstance()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function createInstance($plugin_id, array $configuration = []) {
     return $this->container->get('entity_type.manager')->createInstance($plugin_id, $configuration);
@@ -507,6 +705,10 @@ class EntityManager implements EntityManagerInterface, ContainerAwareInterface {
    * {@inheritdoc}
    *
    * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Entity\EntityTypeManagerInterface::getInstance()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/2549139
    */
   public function getInstance(array $options) {
     return $this->container->get('entity_type.manager')->getInstance($options);
index 6b2738c779300ea16a44022e08bbbf30d815cc29..03d3f66c7ba246c9f0f941c9970769198b198639 100644 (file)
@@ -144,7 +144,7 @@ interface ModuleHandlerInterface {
    *   // Load node.admin.inc from the node module.
    *   $this->loadInclude('node', 'inc', 'node.admin');
    *   // Load content_types.inc from the node module.
-   *   $this->loadInclude('node', 'inc', ''content_types');
+   *   $this->loadInclude('node', 'inc', 'content_types');
    * @endcode
    *
    * @param string $module
index 76366bfe21c56ec332eb46fba5698b9762523680..e53e84b6c89ba1a2979a8dea65771604b04bb209 100644 (file)
@@ -180,6 +180,14 @@ abstract class FieldConfigBase extends ConfigEntityBase implements FieldConfigIn
    */
   protected $constraints = [];
 
+  /**
+   * Array of property constraint options keyed by property ID. The values are
+   * associative array of constraint options keyed by constraint plugin ID.
+   *
+   * @var array[]
+   */
+  protected $propertyConstraints = [];
+
   /**
    * {@inheritdoc}
    */
@@ -515,7 +523,20 @@ abstract class FieldConfigBase extends ConfigEntityBase implements FieldConfigIn
     if (!isset($this->itemDefinition)) {
       $this->itemDefinition = FieldItemDataDefinition::create($this)
         ->setSettings($this->getSettings());
+
+      // Add any custom property constraints, overwriting as required.
+      $item_constraints = $this->itemDefinition->getConstraint('ComplexData') ?: [];
+      foreach ($this->propertyConstraints as $name => $constraints) {
+        if (isset($item_constraints[$name])) {
+          $item_constraints[$name] = $constraints + $item_constraints[$name];
+        }
+        else {
+          $item_constraints[$name] = $constraints;
+        }
+        $this->itemDefinition->addConstraint('ComplexData', $item_constraints);
+      }
     }
+
     return $this->itemDefinition;
   }
 
@@ -546,9 +567,12 @@ abstract class FieldConfigBase extends ConfigEntityBase implements FieldConfigIn
    * {@inheritdoc}
    */
   public function setPropertyConstraints($name, array $constraints) {
-    $item_constraints = $this->getItemDefinition()->getConstraints();
-    $item_constraints['ComplexData'][$name] = $constraints;
-    $this->getItemDefinition()->setConstraints($item_constraints);
+    $this->propertyConstraints[$name] = $constraints;
+
+    // Reset the field item definition so the next time it is instantiated it
+    // will receive the new constraints.
+    $this->itemDefinition = NULL;
+
     return $this;
   }
 
@@ -556,15 +580,14 @@ abstract class FieldConfigBase extends ConfigEntityBase implements FieldConfigIn
    * {@inheritdoc}
    */
   public function addPropertyConstraints($name, array $constraints) {
-    $item_constraints = $this->getItemDefinition()->getConstraint('ComplexData') ?: [];
-    if (isset($item_constraints[$name])) {
-      // Add the new property constraints, overwriting as required.
-      $item_constraints[$name] = $constraints + $item_constraints[$name];
-    }
-    else {
-      $item_constraints[$name] = $constraints;
+    foreach ($constraints as $constraint_name => $options) {
+      $this->propertyConstraints[$name][$constraint_name] = $options;
     }
-    $this->getItemDefinition()->addConstraint('ComplexData', $item_constraints);
+
+    // Reset the field item definition so the next time it is instantiated it
+    // will receive the new constraints.
+    $this->itemDefinition = NULL;
+
     return $this;
   }
 
index de0c99828622ce7c97fce41c3926b05001672813..6c9bb5901cda8e88ae8ecdb878948af8b09bc8c3 100644 (file)
@@ -5,7 +5,7 @@ namespace Drupal\Core\Form;
 /**
  * Provides an interface for a Form that has a base form ID.
  *
- * This will become the $form_state->getBaseInfo()['base_form_id'] used to
+ * This will become the $form_state->getBuildInfo()['base_form_id'] used to
  * generate the name of hook_form_BASE_FORM_ID_alter().
  */
 interface BaseFormIdInterface extends FormInterface {
index 6e78d527a7f0fae8669321b04a03459773bc1198..db7a16165b80477641c3a61c178ba5fe1d1c47d0 100644 (file)
@@ -627,7 +627,7 @@ function hook_preprocess_HOOK(&$variables) {
 function hook_theme_suggestions_HOOK(array $variables) {
   $suggestions = [];
 
-  $suggestions[] = 'node__' . $variables['elements']['#langcode'];
+  $suggestions[] = 'hookname__' . $variables['elements']['#langcode'];
 
   return $suggestions;
 }
similarity index 98%
rename from web/core/modules/aggregator/src/Tests/AddFeedTest.php
rename to web/core/modules/aggregator/tests/src/Functional/AddFeedTest.php
index 4dfeb955720aefdcbb6336b3a1e816cd4c75dd7f..e4f63ea73105c326eaeb6d819ce72c59b66b9070 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\aggregator\Tests;
+namespace Drupal\Tests\aggregator\Functional;
 
 /**
  * Add feed test.
similarity index 83%
rename from web/core/modules/aggregator/src/Tests/AggregatorAdminTest.php
rename to web/core/modules/aggregator/tests/src/Functional/AggregatorAdminTest.php
index 01898b6cf09dca27b44be1b849e28e7d1719d251..4b278d6247199fbda196dd9c900608ff33054bca 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\aggregator\Tests;
+namespace Drupal\Tests\aggregator\Functional;
 
 /**
  * Tests aggregator admin pages.
@@ -67,18 +67,22 @@ class AggregatorAdminTest extends AggregatorTestBase {
     // Check if the amount of feeds in the overview matches the amount created.
     $this->assertEqual(1, count($result), 'Created feed is found in the overview');
     // Check if the fields in the table match with what's expected.
-    $this->assertEqual($feed->label(), (string) $result[0]->td[0]->a);
+    $link = $this->xpath('//table/tbody/tr//td[1]/a');
+    $this->assertEquals($feed->label(), $link[0]->getText());
     $count = $this->container->get('entity.manager')->getStorage('aggregator_item')->getItemCount($feed);
-    $this->assertEqual(\Drupal::translation()->formatPlural($count, '1 item', '@count items'), (string) $result[0]->td[1]);
+    $td = $this->xpath('//table/tbody/tr//td[2]');
+    $this->assertEquals(\Drupal::translation()->formatPlural($count, '1 item', '@count items'), $td[0]->getText());
 
     // Update the items of the first feed.
     $feed->refreshItems();
     $this->drupalGet('admin/config/services/aggregator');
     $result = $this->xpath('//table/tbody/tr');
     // Check if the fields in the table match with what's expected.
-    $this->assertEqual($feed->label(), (string) $result[0]->td[0]->a);
+    $link = $this->xpath('//table/tbody/tr//td[1]/a');
+    $this->assertEquals($feed->label(), $link[0]->getText());
     $count = $this->container->get('entity.manager')->getStorage('aggregator_item')->getItemCount($feed);
-    $this->assertEqual(\Drupal::translation()->formatPlural($count, '1 item', '@count items'), (string) $result[0]->td[1]);
+    $td = $this->xpath('//table/tbody/tr//td[2]');
+    $this->assertEquals(\Drupal::translation()->formatPlural($count, '1 item', '@count items'), $td[0]->getText());
   }
 
 }
similarity index 93%
rename from web/core/modules/aggregator/src/Tests/AggregatorCronTest.php
rename to web/core/modules/aggregator/tests/src/Functional/AggregatorCronTest.php
index 9ebb2d25c00c36563b9913f7dffcb8240e8b6ef7..bb7c90ae32f238f02fe266ee3270e064755eb64d 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 
-namespace Drupal\aggregator\Tests;
+namespace Drupal\Tests\aggregator\Functional;
+
+use Drupal\Tests\Traits\Core\CronRunTrait;
 
 /**
  * Update feeds on cron.
@@ -8,6 +10,9 @@ namespace Drupal\aggregator\Tests;
  * @group aggregator
  */
 class AggregatorCronTest extends AggregatorTestBase {
+
+  use CronRunTrait;
+
   /**
    * Adds feeds and updates them via cron process.
    */
similarity index 91%
rename from web/core/modules/aggregator/src/Tests/AggregatorRenderingTest.php
rename to web/core/modules/aggregator/tests/src/Functional/AggregatorRenderingTest.php
index de7e401058b23eb403ab9afc19fe3fdb15c829fb..37e6470847f5f5c5f490c57f57cb8b0d4735d6f6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\aggregator\Tests;
+namespace Drupal\Tests\aggregator\Functional;
 
 use Drupal\Component\Utility\SafeMarkup;
 use Drupal\views\Entity\View;
@@ -132,10 +132,14 @@ class AggregatorRenderingTest extends AggregatorTestBase {
 
     // Check the opml aggregator page.
     $this->drupalGet('aggregator/opml');
-    $outline = $this->xpath('//outline[1]');
-    $this->assertEqual($outline[0]['type'], 'rss', 'The correct type attribute is used for rss OPML.');
-    $this->assertEqual($outline[0]['text'], $feed->label(), 'The correct text attribute is used for rss OPML.');
-    $this->assertEqual($outline[0]['xmlurl'], $feed->getUrl(), 'The correct xmlUrl attribute is used for rss OPML.');
+    $content = $this->getSession()->getPage()->getContent();
+    // We can't use Mink xpath queries here because it only supports HTML pages,
+    // but we are dealing with XML here.
+    $xml = simplexml_load_string($content);
+    $attributes = $xml->xpath('//outline[1]')[0]->attributes();
+    $this->assertEquals('rss', $attributes->type);
+    $this->assertEquals($feed->label(), $attributes->text);
+    $this->assertEquals($feed->getUrl(), $attributes->xmlUrl);
 
     // Check for the presence of a pager.
     $this->drupalGet('aggregator/sources/' . $feed->id());
similarity index 98%
rename from web/core/modules/aggregator/src/Tests/FeedAdminDisplayTest.php
rename to web/core/modules/aggregator/tests/src/Functional/FeedAdminDisplayTest.php
index 46366b4957d74a5e08dc8ded505d5d94a907a692..e057be6e613bee28705190ce4be5eae1103b2458 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\aggregator\Tests;
+namespace Drupal\Tests\aggregator\Functional;
 
 /**
  * Tests the display of a feed on the Aggregator list page.
similarity index 95%
rename from web/core/modules/aggregator/src/Tests/FeedLanguageTest.php
rename to web/core/modules/aggregator/tests/src/Functional/FeedLanguageTest.php
index 98d04fa5c1319e5a9ba25460311fd4135f65f704..7e3d672c06c1f27464e204dae155b62839e4ab4f 100644 (file)
@@ -1,8 +1,9 @@
 <?php
 
-namespace Drupal\aggregator\Tests;
+namespace Drupal\Tests\aggregator\Functional;
 
 use Drupal\language\Entity\ConfigurableLanguage;
+use Drupal\Tests\Traits\Core\CronRunTrait;
 
 /**
  * Tests aggregator feeds in multiple languages.
@@ -11,6 +12,8 @@ use Drupal\language\Entity\ConfigurableLanguage;
  */
 class FeedLanguageTest extends AggregatorTestBase {
 
+  use CronRunTrait;
+
   /**
    * Modules to install.
    *
similarity index 98%
rename from web/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php
rename to web/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php
index 67e96f17269cca612af6f495d8815bbb991dba1e..b850ca9ed8eb6769504ceaae00b4ea248206dcd1 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\aggregator\Tests;
+namespace Drupal\Tests\aggregator\Functional;
 use Drupal\aggregator\Entity\Feed;
 
 /**
similarity index 97%
rename from web/core/modules/aggregator/src/Tests/UpdateFeedTest.php
rename to web/core/modules/aggregator/tests/src/Functional/UpdateFeedTest.php
index d2308744c2425d535eafec1ab2aa1bad8b54f335..a81e0aefd1f906d04b0373441a5eb0f2cd3dc066 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\aggregator\Tests;
+namespace Drupal\Tests\aggregator\Functional;
 
 /**
  * Update feed test.
index e97e740187e173d711ca776dc386b48eac43862b..ef0bd96ea2652e1b1e249ca906ed5689c6b2800b 100644 (file)
@@ -178,8 +178,8 @@ class BlockContentBlock extends BlockBase implements ContainerFactoryPluginInter
    *   The block content entity.
    */
   protected function getEntity() {
-    $uuid = $this->getDerivativeId();
     if (!isset($this->blockContent)) {
+      $uuid = $this->getDerivativeId();
       $this->blockContent = $this->entityManager->loadEntityByUuid('block_content', $uuid);
     }
     return $this->blockContent;
index db665c9e45ce4e7edeb346a975370aa9d8790584..3ea2dba06cfb846248ebacccfef2a8c0107dc662 100644 (file)
@@ -2,6 +2,8 @@
 
 namespace Drupal\block_content\Tests\Views;
 
+@trigger_error('\Drupal\block_content\Tests\Views\BlockContentTestBase is deprecated in 8.4.0 and will be removed before Drupal 9.0.0. Use \Drupal\Tests\block_content\Functional\Views\BlockContentTestBase.', E_USER_DEPRECATED);
+
 use Drupal\block_content\Entity\BlockContent;
 use Drupal\block_content\Entity\BlockContentType;
 use Drupal\Component\Utility\SafeMarkup;
@@ -10,6 +12,9 @@ use Drupal\views\Tests\ViewTestData;
 
 /**
  * Base class for all block_content tests.
+ *
+ * @deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0.
+ *   Use \Drupal\Tests\block_content\Functional\Views\BlockContentTestBase.
  */
 abstract class BlockContentTestBase extends ViewTestBase {
 
similarity index 98%
rename from web/core/modules/block_content/src/Tests/BlockContentCreationTest.php
rename to web/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php
index ac9e824d4940d192be75a1e7c43fdc629cbba17d..562a4bd102ff067c2fe3e2f31e1dfb924c4bc95a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\block_content\Tests;
+namespace Drupal\Tests\block_content\Functional;
 
 use Drupal\block_content\Entity\BlockContent;
 use Drupal\Component\Utility\Unicode;
@@ -140,7 +140,7 @@ class BlockContentCreationTest extends BlockContentTestBase {
 
     // Go to the configure page and verify the view mode has changed.
     $this->drupalGet('admin/structure/block/manage/testblock');
-    $this->assertFieldByXPath('//select[@name="settings[view_mode]"]/option[@selected="selected"]/@value', 'test_view_mode', 'View mode changed to Test View Mode');
+    $this->assertFieldByXPath('//select[@name="settings[view_mode]"]/option[@selected="selected"]', 'test_view_mode', 'View mode changed to Test View Mode');
 
     // Check that the block exists in the database.
     $blocks = entity_load_multiple_by_properties('block_content', ['info' => $edit['info[0][value]']]);
similarity index 95%
rename from web/core/modules/block_content/src/Tests/BlockContentListTest.php
rename to web/core/modules/block_content/tests/src/Functional/BlockContentListTest.php
index e00706e9ff5028b853c7c077b1f3f03df784c56e..aba60c366c629158b87840b6596aea7b1e72efd5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\block_content\Tests;
+namespace Drupal\Tests\block_content\Functional;
 
 /**
  * Tests the listing of custom blocks.
@@ -41,7 +41,7 @@ class BlockContentListTest extends BlockContentTestBase {
     // Test the contents of each th cell.
     $expected_items = [t('Block description'), t('Operations')];
     foreach ($elements as $key => $element) {
-      $this->assertEqual($element[0], $expected_items[$key]);
+      $this->assertEqual($element->getText(), $expected_items[$key]);
     }
 
     $label = 'Antelope';
@@ -66,7 +66,7 @@ class BlockContentListTest extends BlockContentTestBase {
     // Check the contents of each row cell. The first cell contains the label,
     // the second contains the machine name, and the third contains the
     // operations list.
-    $this->assertIdentical((string) $elements[0], $label);
+    $this->assertIdentical($elements[0]->getText(), $label);
 
     // Edit the entity using the operations link.
     $blocks = $this->container
similarity index 91%
rename from web/core/modules/block_content/src/Tests/BlockContentListViewsTest.php
rename to web/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php
index 77117fb009fe6073cb0db07b8f774047a639daf9..1c623be82eba3c9cf4af6525a00f07fa3971df37 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\block_content\Tests;
+namespace Drupal\Tests\block_content\Functional;
 
 /**
  * Tests the Views-powered listing of custom blocks.
@@ -41,13 +41,13 @@ class BlockContentListViewsTest extends BlockContentTestBase {
     $this->assertEqual(count($elements), 4, 'Correct number of table header cells found.');
 
     // Test the contents of each th cell.
-    $expected_items = ['Block description', 'Block type', 'Updated', 'Operations'];
+    $expected_items = ['Block description', 'Block type', 'Updated Sort ascending', 'Operations'];
     foreach ($elements as $key => $element) {
-      if ($element->xpath('a')) {
-        $this->assertIdentical(trim((string) $element->xpath('a')[0]), $expected_items[$key]);
+      if ($element->find('xpath', 'a')) {
+        $this->assertIdentical(trim($element->find('xpath', 'a')->getText()), $expected_items[$key]);
       }
       else {
-        $this->assertIdentical(trim((string) $element[0]), $expected_items[$key]);
+        $this->assertIdentical(trim($element->getText()), $expected_items[$key]);
       }
     }
 
@@ -73,7 +73,7 @@ class BlockContentListViewsTest extends BlockContentTestBase {
     // Check the contents of each row cell. The first cell contains the label,
     // the second contains the machine name, and the third contains the
     // operations list.
-    $this->assertIdentical((string) $elements[0]->xpath('a')[0], $label);
+    $this->assertIdentical($elements[0]->find('xpath', 'a')->getText(), $label);
 
     // Edit the entity using the operations link.
     $blocks = $this->container
similarity index 99%
rename from web/core/modules/block_content/src/Tests/BlockContentTranslationUITest.php
rename to web/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php
index 198beee8fb3fbabb465282aaf9a203392fbf0b3e..2699fcfb691282acafbd8d5f803628142c8492fe 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\block_content\Tests;
+namespace Drupal\Tests\block_content\Functional;
 
 use Drupal\block_content\Entity\BlockContent;
 use Drupal\block_content\Entity\BlockContentType;
similarity index 96%
rename from web/core/modules/block_content/src/Tests/BlockContentValidationTest.php
rename to web/core/modules/block_content/tests/src/Functional/BlockContentValidationTest.php
index a0db394c6e90f90eacaa8183cdae7d2039c87118..bfa84082c1ca364eaec02bfeb1c9d6850c985588 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\block_content\Tests;
+namespace Drupal\Tests\block_content\Functional;
 
 /**
  * Tests block content validation constraints.
similarity index 95%
rename from web/core/modules/block_content/src/Tests/Views/BlockContentFieldFilterTest.php
rename to web/core/modules/block_content/tests/src/Functional/Views/BlockContentFieldFilterTest.php
index 1ff4fb55baf74daf117f430b31df552611d28c82..a016ab9141b72a375e48acd1cc9acd6f053b1463 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\block_content\Tests\Views;
+namespace Drupal\Tests\block_content\Functional\Views;
 
 use Drupal\field\Entity\FieldStorageConfig;
 use Drupal\language\Entity\ConfigurableLanguage;
@@ -35,8 +35,8 @@ class BlockContentFieldFilterTest extends BlockContentTestBase {
   /**
    * {@inheritdoc}
    */
-  public function setUp() {
-    parent::setUp();
+  public function setUp($import_test_views = TRUE) {
+    parent::setUp($import_test_views);
 
     // Add two new languages.
     ConfigurableLanguage::createFromLangcode('fr')->save();
similarity index 95%
rename from web/core/modules/block_content/src/Tests/Views/BlockContentIntegrationTest.php
rename to web/core/modules/block_content/tests/src/Functional/Views/BlockContentIntegrationTest.php
index 8ec17e238165c6dec7a6a585dcf2ace7bfd234c5..93661578bd9df34229d0a1880bfee8c1f91f3603 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\block_content\Tests\Views;
+namespace Drupal\Tests\block_content\Functional\Views;
 
 /**
  * Tests the block_content integration into views.
@@ -59,7 +59,7 @@ class BlockContentIntegrationTest extends BlockContentTestBase {
     $result = $this->xpath('//span[@class="field-content"]');
     $ids = [];
     foreach ($result as $element) {
-      $ids[] = (int) $element;
+      $ids[] = $element->getText();
     }
     $this->assertEqual($ids, $expected_ids);
   }
similarity index 95%
rename from web/core/modules/block_content/src/Tests/Views/BlockContentRedirectTest.php
rename to web/core/modules/block_content/tests/src/Functional/Views/BlockContentRedirectTest.php
index 828aa8468b12f0e355759fe44eeb4d24762c5e10..10ce140e967edd2b39054a1d41a294f23c68f04f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\block_content\Tests\Views;
+namespace Drupal\Tests\block_content\Functional\Views;
 
 /**
  * Tests the redirect destination on block content on entity operations.
diff --git a/web/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php b/web/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php
new file mode 100644 (file)
index 0000000..ffce588
--- /dev/null
@@ -0,0 +1,107 @@
+<?php
+
+namespace Drupal\Tests\block_content\Functional\Views;
+
+use Drupal\block_content\Entity\BlockContent;
+use Drupal\block_content\Entity\BlockContentType;
+use Drupal\Component\Utility\SafeMarkup;
+use Drupal\Tests\views\Functional\ViewTestBase;
+use Drupal\views\Tests\ViewTestData;
+
+/**
+ * Base class for all block_content tests.
+ */
+abstract class BlockContentTestBase extends ViewTestBase {
+
+  /**
+   * Admin user
+   *
+   * @var object
+   */
+  protected $adminUser;
+
+  /**
+   * Permissions to grant admin user.
+   *
+   * @var array
+   */
+  protected $permissions = [
+    'administer blocks',
+  ];
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = ['block', 'block_content', 'block_content_test_views'];
+
+  protected function setUp($import_test_views = TRUE) {
+    parent::setUp($import_test_views);
+    // Ensure the basic bundle exists. This is provided by the standard profile.
+    $this->createBlockContentType(['id' => 'basic']);
+
+    $this->adminUser = $this->drupalCreateUser($this->permissions);
+
+    if ($import_test_views) {
+      ViewTestData::createTestViews(get_class($this), ['block_content_test_views']);
+    }
+  }
+
+  /**
+   * Creates a custom block.
+   *
+   * @param array $settings
+   *   (optional) An associative array of settings for the block_content, as
+   *   used in entity_create().
+   *
+   * @return \Drupal\block_content\Entity\BlockContent
+   *   Created custom block.
+   */
+  protected function createBlockContent(array $settings = []) {
+    $status = 0;
+    $settings += [
+      'info' => $this->randomMachineName(),
+      'type' => 'basic',
+      'langcode' => 'en',
+    ];
+    if ($block_content = BlockContent::create($settings)) {
+      $status = $block_content->save();
+    }
+    $this->assertEqual($status, SAVED_NEW, SafeMarkup::format('Created block content %info.', ['%info' => $block_content->label()]));
+    return $block_content;
+  }
+
+  /**
+   * Creates a custom block type (bundle).
+   *
+   * @param array $values
+   *   An array of settings to change from the defaults.
+   *
+   * @return \Drupal\block_content\Entity\BlockContentType
+   *   Created custom block type.
+   */
+  protected function createBlockContentType(array $values = []) {
+    // Find a non-existent random type name.
+    if (!isset($values['id'])) {
+      do {
+        $id = strtolower($this->randomMachineName(8));
+      } while (BlockContentType::load($id));
+    }
+    else {
+      $id = $values['id'];
+    }
+    $values += [
+      'id' => $id,
+      'label' => $id,
+      'revision' => FALSE
+    ];
+    $bundle = BlockContentType::create($values);
+    $status = $bundle->save();
+    block_content_add_body_field($bundle->id());
+
+    $this->assertEqual($status, SAVED_NEW, SafeMarkup::format('Created block content type %bundle.', ['%bundle' => $bundle->id()]));
+    return $bundle;
+  }
+
+}
similarity index 93%
rename from web/core/modules/block_content/src/Tests/Views/FieldTypeTest.php
rename to web/core/modules/block_content/tests/src/Functional/Views/FieldTypeTest.php
index e9aa336985370ae893f5e2cfc8aa18d05269f646..8ff2fc05ca0ed94df869e0a61ec599e0842c239c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\block_content\Tests\Views;
+namespace Drupal\Tests\block_content\Functional\Views;
 
 use Drupal\views\Views;
 
similarity index 92%
rename from web/core/modules/block_content/src/Tests/Views/RevisionRelationshipsTest.php
rename to web/core/modules/block_content/tests/src/Functional/Views/RevisionRelationshipsTest.php
index 7bad093dd3a6b727c8a0c7128c1bf918f32c21c6..0ccebd2a9f665bd5daa3573c95d186a3cadf9c86 100644 (file)
@@ -1,10 +1,10 @@
 <?php
 
-namespace Drupal\block_content\Tests\Views;
+namespace Drupal\Tests\block_content\Functional\Views;
 
 use Drupal\block_content\Entity\BlockContentType;
 use Drupal\block_content\Entity\BlockContent;
-use Drupal\views\Tests\ViewTestBase;
+use Drupal\Tests\views\Functional\ViewTestBase;
 use Drupal\views\Views;
 use Drupal\views\Tests\ViewTestData;
 
@@ -29,8 +29,8 @@ class RevisionRelationshipsTest extends ViewTestBase {
    */
   public static $testViews = ['test_block_content_revision_id', 'test_block_content_revision_revision_id'];
 
-  protected function setUp() {
-    parent::setUp();
+  protected function setUp($import_test_views = TRUE) {
+    parent::setUp($import_test_views);
     BlockContentType::create([
       'id' => 'basic',
       'label' => 'basic',
similarity index 95%
rename from web/core/modules/book/src/Tests/Views/BookRelationshipTest.php
rename to web/core/modules/book/tests/src/Functional/Views/BookRelationshipTest.php
index c1f872803aeb219c0656b38f448abbfba1333a94..9ee79c78dc6110ec7a7573319f11719c047c5bc1 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-namespace Drupal\book\Tests\Views;
+namespace Drupal\Tests\book\Functional\Views;
 
-use Drupal\views\Tests\ViewTestBase;
+use Drupal\Tests\views\Functional\ViewTestBase;
 use Drupal\views\Tests\ViewTestData;
 
 /**
@@ -45,8 +45,8 @@ class BookRelationshipTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
-    parent::setUp();
+  protected function setUp($import_test_views = TRUE) {
+    parent::setUp($import_test_views);
 
     // Create users.
     $this->bookAuthor = $this->drupalCreateUser(
index a5f196646974da48c9e71ba4b35f1cc12d338630..8ce0c73edb9efd967d04e34160155edd6330c718 100644 (file)
@@ -81,14 +81,6 @@ class Comment extends ContentEntityBase implements CommentInterface {
   public function preSave(EntityStorageInterface $storage) {
     parent::preSave($storage);
 
-    if (is_null($this->get('status')->value)) {
-      if (\Drupal::currentUser()->hasPermission('skip comment approval')) {
-        $this->setPublished();
-      }
-      else {
-        $this->setUnpublished();
-      }
-    }
     if ($this->isNew()) {
       // Add the comment to database. This next section builds the thread field.
       // @see \Drupal\comment\CommentViewBuilder::buildComponents()
@@ -237,6 +229,9 @@ class Comment extends ContentEntityBase implements CommentInterface {
 
     $fields['langcode']->setDescription(t('The comment language code.'));
 
+    // Set the default value callback for the status field.
+    $fields['status']->setDefaultValueCallback('Drupal\comment\Entity\Comment::getDefaultStatus');
+
     $fields['pid'] = BaseFieldDefinition::create('entity_reference')
       ->setLabel(t('Parent ID'))
       ->setDescription(t('The parent comment ID if this is a reply to a comment.'))
@@ -558,4 +553,16 @@ class Comment extends ContentEntityBase implements CommentInterface {
     return $this->bundle();
   }
 
+  /**
+   * Default value callback for 'status' base field definition.
+   *
+   * @see ::baseFieldDefinitions()
+   *
+   * @return bool
+   *  TRUE if the comment should be published, FALSE otherwise.
+   */
+  public static function getDefaultStatus() {
+    return \Drupal::currentUser()->hasPermission('skip comment approval') ? CommentInterface::PUBLISHED : CommentInterface::NOT_PUBLISHED;
+  }
+
 }
index e724dc6b89c5c14c4a9b8e415ae65cb64daa6cd5..9dbe6d36eba7d7786980dccbc7233cc097f0a3f5 100644 (file)
@@ -81,10 +81,6 @@ class CommentLockTest extends UnitTestCase {
     $comment->expects($this->any())
       ->method('getEntityType')
       ->will($this->returnValue($entity_type));
-    $comment->expects($this->at(1))
-      ->method('get')
-      ->with('status')
-      ->will($this->returnValue((object) ['value' => NULL]));
     $storage = $this->getMock('Drupal\comment\CommentStorageInterface');
 
     // preSave() should acquire the lock. (This is what's really being tested.)
similarity index 92%
rename from web/core/modules/config_translation/src/Tests/ConfigTranslationFormTest.php
rename to web/core/modules/config_translation/tests/src/Functional/ConfigTranslationFormTest.php
index 387d6864604d33f88c08e17129ae7c549a8a1f32..4698b05a8ec313aa8dc02f8e9ab5d8a2103a9976 100644 (file)
@@ -1,16 +1,16 @@
 <?php
 
-namespace Drupal\config_translation\Tests;
+namespace Drupal\Tests\config_translation\Functional;
 
 use Drupal\language\Entity\ConfigurableLanguage;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests for altering configuration translation forms.
  *
  * @group config_translation
  */
-class ConfigTranslationFormTest extends WebTestBase {
+class ConfigTranslationFormTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
similarity index 90%
rename from web/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php
rename to web/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php
index d593a69d385d7a262389a6b4f4d0cea2d45409bd..55b02dca75ebaaee09f9220bb734bfce0da7f741 100644 (file)
@@ -1,17 +1,17 @@
 <?php
 
-namespace Drupal\config_translation\Tests;
+namespace Drupal\Tests\config_translation\Functional;
 
 use Drupal\Component\Utility\Html;
 use Drupal\language\Entity\ConfigurableLanguage;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Translate settings and entities to various languages.
  *
  * @group config_translation
  */
-class ConfigTranslationOverviewTest extends WebTestBase {
+class ConfigTranslationOverviewTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
@@ -77,10 +77,8 @@ class ConfigTranslationOverviewTest extends WebTestBase {
     // Make sure there is only a single operation for each dropbutton, either
     // 'List' or 'Translate'.
     foreach ($this->cssSelect('ul.dropbutton') as $i => $dropbutton) {
-      $this->assertIdentical(1, $dropbutton->count());
-      foreach ($dropbutton->li as $link) {
-        $this->assertTrue(((string) $link->a === 'Translate') || ((string) $link->a === 'List'));
-      }
+      $this->assertIdentical(1, count($dropbutton->find('xpath', 'li')));
+      $this->assertTrue(($dropbutton->getText() === 'Translate') || ($dropbutton->getText() === 'List'));
     }
 
     $labels = [
@@ -104,10 +102,8 @@ class ConfigTranslationOverviewTest extends WebTestBase {
       // Make sure there is only a single 'Translate' operation for each
       // dropbutton.
       foreach ($this->cssSelect('ul.dropbutton') as $i => $dropbutton) {
-        $this->assertIdentical(1, $dropbutton->count());
-        foreach ($dropbutton->li as $link) {
-          $this->assertIdentical('Translate', (string) $link->a);
-        }
+        $this->assertIdentical(1, count($dropbutton->find('xpath', 'li')));
+        $this->assertIdentical('Translate', $dropbutton->getText());
       }
 
       $entity_type = \Drupal::entityManager()->getDefinition($test_entity->getEntityTypeId());
similarity index 86%
rename from web/core/modules/config_translation/src/Tests/ConfigTranslationUiThemeTest.php
rename to web/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php
index 53713a92384703e13495405f3c7a2c493a9cbc25..dcfb7916fe850d1724e37e531d47b477097b679c 100644 (file)
@@ -1,16 +1,16 @@
 <?php
 
-namespace Drupal\config_translation\Tests;
+namespace Drupal\Tests\config_translation\Functional;
 
 use Drupal\language\Entity\ConfigurableLanguage;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Verifies theme configuration translation settings.
  *
  * @group config_translation
  */
-class ConfigTranslationUiThemeTest extends WebTestBase {
+class ConfigTranslationUiThemeTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
@@ -65,7 +65,7 @@ class ConfigTranslationUiThemeTest extends WebTestBase {
       ':label' => 'Install and set as default',
       ':theme' => $theme,
     ]);
-    $this->drupalGet($GLOBALS['base_root'] . $elements[0]['href'], ['external' => TRUE]);
+    $this->drupalGet($GLOBALS['base_root'] . $elements[0]->getAttribute('href'), ['external' => TRUE]);
 
     $translation_base_url = 'admin/config/development/performance/translate';
     $this->drupalGet($translation_base_url);
similarity index 86%
rename from web/core/modules/config_translation/src/Tests/ConfigTranslationViewListUiTest.php
rename to web/core/modules/config_translation/tests/src/Functional/ConfigTranslationViewListUiTest.php
index b259a1858cfdd3b6ff560a03b50d7361515ff28b..edb41f9ad44190537af4920317c92fdd14a7eba3 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-namespace Drupal\config_translation\Tests;
+namespace Drupal\Tests\config_translation\Functional;
 
-use Drupal\views_ui\Tests\UITestBase;
+use Drupal\Tests\views_ui\Functional\UITestBase;
 
 /**
  * Visit view list and test if translate is available.
@@ -25,8 +25,8 @@ class ConfigTranslationViewListUiTest extends UITestBase {
    */
   public static $modules = ['config_translation', 'views_ui'];
 
-  protected function setUp() {
-    parent::setUp();
+  protected function setUp($import_test_views = TRUE) {
+    parent::setUp($import_test_views);
 
     $permissions = [
       'administer views',
similarity index 88%
rename from web/core/modules/contact/src/Tests/Views/ContactFieldsTest.php
rename to web/core/modules/contact/tests/src/Functional/Views/ContactFieldsTest.php
index fafe451be5c18080a8b9a222d58961737dbca22c..c66b5ad5d4cbc20d3d6f99d8575d79261e4d7697 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
-namespace Drupal\contact\Tests\Views;
+namespace Drupal\Tests\contact\Functional\Views;
 
 use Drupal\field\Entity\FieldConfig;
-use Drupal\views\Tests\ViewTestBase;
+use Drupal\Tests\views\Functional\ViewTestBase;
 use Drupal\field\Entity\FieldStorageConfig;
 use Drupal\contact\Entity\ContactForm;
 
@@ -28,8 +28,8 @@ class ContactFieldsTest extends ViewTestBase {
    */
   protected $fieldStorage;
 
-  protected function setUp() {
-    parent::setUp();
+  protected function setUp($import_test_views = TRUE) {
+    parent::setUp($import_test_views);
 
     $this->fieldStorage = FieldStorageConfig::create([
       'field_name' => strtolower($this->randomMachineName()),
similarity index 94%
rename from web/core/modules/contact/src/Tests/Views/ContactLinkTest.php
rename to web/core/modules/contact/tests/src/Functional/Views/ContactLinkTest.php
index f6b6013b43aef02f34bc24284032fb27fa26088c..c3b68f067a6baa9c02d091c93a5580a0a32abf58 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
-namespace Drupal\contact\Tests\Views;
+namespace Drupal\Tests\contact\Functional\Views;
 
 use Drupal\Core\Cache\Cache;
-use Drupal\views\Tests\ViewTestBase;
+use Drupal\Tests\views\Functional\ViewTestBase;
 use Drupal\views\Tests\ViewTestData;
 use Drupal\user\Entity\User;
 
@@ -39,8 +39,8 @@ class ContactLinkTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
-    parent::setUp();
+  protected function setUp($import_test_views = TRUE) {
+    parent::setUp($import_test_views);
 
     ViewTestData::createTestViews(get_class($this), ['contact_test_views']);
 
index 51605d5383d68aa9113afffcceabfe7ef49fe5f7..2e8d27ffa83a0ef292aa296278f392f5211af250 100644 (file)
@@ -295,7 +295,7 @@ class ContentModeration extends WorkflowTypeBase implements ContainerFactoryPlug
    */
   public function getInitialState(WorkflowInterface $workflow, $entity = NULL) {
     if ($entity instanceof EntityPublishedInterface) {
-      return $workflow->getState($entity->isPublished() ? 'published' : 'draft');
+      return $workflow->getState($entity->isPublished() && !$entity->isNew() ? 'published' : 'draft');
     }
     return parent::getInitialState($workflow);
   }
index 0150d3c6e5f524c329937700aed7832c0864ca22..3db6a662ce266724314b47d38c6b04ab76ac8544 100644 (file)
@@ -77,6 +77,12 @@ class InitialStateTest extends KernelTestBase {
     $this->assertEquals('draft', $loaded_unpublished_node->moderation_state->value);
     $this->assertEquals('published', $loaded_published_node->moderation_state->value);
     $this->assertEquals('draft', $loaded_entity_test->moderation_state->value);
+
+    $presave_node = Node::create([
+      'type' => 'example',
+      'title' => 'Presave node',
+    ]);
+    $this->assertEquals('draft', $presave_node->moderation_state->value);
   }
 
 }
index 7e9a75c3f412e0d78dcf3afa062472edcf9dae68..5a2f6a0b325559275b9fb3740f098bcf28c63907 100644 (file)
@@ -64,7 +64,8 @@ class ModerationStateFieldItemListTest extends KernelTestBase {
    * Test the field item list when accessing an index.
    */
   public function testArrayIndex() {
-    $this->assertEquals('published', $this->testNode->moderation_state[0]->value);
+    $this->assertFalse($this->testNode->isPublished());
+    $this->assertEquals('draft', $this->testNode->moderation_state[0]->value);
   }
 
   /**
@@ -75,7 +76,7 @@ class ModerationStateFieldItemListTest extends KernelTestBase {
     foreach ($this->testNode->moderation_state as $item) {
       $states[] = $item->value;
     }
-    $this->assertEquals(['published'], $states);
+    $this->assertEquals(['draft'], $states);
   }
 
 }
similarity index 93%
rename from web/core/modules/content_translation/src/Tests/ContentTestTranslationUITest.php
rename to web/core/modules/content_translation/tests/src/Functional/ContentTestTranslationUITest.php
index 1688f75fd6b0bfa7499305f746e63d87f0959379..0b1de0b204f4ff108b12d0b80e11130c58f21a31 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\content_translation\Tests;
+namespace Drupal\Tests\content_translation\Functional;
 
 /**
  * Tests the test content translation UI with the test entity.
similarity index 88%
rename from web/core/modules/content_translation/src/Tests/ContentTranslationEnableTest.php
rename to web/core/modules/content_translation/tests/src/Functional/ContentTranslationEnableTest.php
index 11c816c1d724cb4ca87a786bb4180beeb0d16c38..a3cc4e99466c59333193e355f87f32ff8ad37fd8 100644 (file)
@@ -1,15 +1,15 @@
 <?php
 
-namespace Drupal\content_translation\Tests;
+namespace Drupal\Tests\content_translation\Functional;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Test enabling content translation module.
  *
  * @group content_translation
  */
-class ContentTranslationEnableTest extends WebTestBase {
+class ContentTranslationEnableTest extends BrowserTestBase {
 
   /**
    * {@inheritdoc}
@@ -36,7 +36,7 @@ class ContentTranslationEnableTest extends WebTestBase {
     // No pending updates should be available.
     $this->drupalGet('admin/reports/status');
     $requirement_value = $this->cssSelect("details.system-status-report__entry summary:contains('Entity/field definitions') + div");
-    $this->assertEqual(t('Up to date'), trim((string) $requirement_value[0]));
+    $this->assertEqual(t('Up to date'), trim($requirement_value[0]->getText()));
 
     $this->drupalGet('admin/config/regional/content-language');
     // The node entity type should not be an option because it has no bundles.
@@ -54,7 +54,7 @@ class ContentTranslationEnableTest extends WebTestBase {
     // No pending updates should be available.
     $this->drupalGet('admin/reports/status');
     $requirement_value = $this->cssSelect("details.system-status-report__entry summary:contains('Entity/field definitions') + div");
-    $this->assertEqual(t('Up to date'), trim((string) $requirement_value[0]));
+    $this->assertEqual(t('Up to date'), trim($requirement_value[0]->getText()));
 
     // Create a node type and check the content translation settings are now
     // available for nodes.
similarity index 98%
rename from web/core/modules/content_translation/src/Tests/ContentTranslationLanguageChangeTest.php
rename to web/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php
index bb9b2235ebd87f8a089d126d1fbc0a197177f55a..3236a592c3dc091f5516409a799201a662e5daf3 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\content_translation\Tests;
+namespace Drupal\Tests\content_translation\Functional;
 
 use Drupal\language\Entity\ConfigurableLanguage;
 use Drupal\node\Tests\NodeTestBase;
similarity index 98%
rename from web/core/modules/content_translation/src/Tests/ContentTranslationSettingsTest.php
rename to web/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php
index 7a1c598047b7d2d55d77daa47717bb1e7bc1415c..f15a8f9bc8d11a5fdf517567863e3e73cd1eec86 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\content_translation\Tests;
+namespace Drupal\Tests\content_translation\Functional;
 
 use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface;
 use Drupal\comment\Tests\CommentTestTrait;
@@ -8,14 +8,14 @@ use Drupal\Core\Field\Entity\BaseFieldOverride;
 use Drupal\Core\Language\Language;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\language\Entity\ContentLanguageSettings;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests the content translation settings UI.
  *
  * @group content_translation
  */
-class ContentTranslationSettingsTest extends WebTestBase {
+class ContentTranslationSettingsTest extends BrowserTestBase {
 
   use CommentTestTrait;
 
@@ -193,7 +193,7 @@ class ContentTranslationSettingsTest extends WebTestBase {
     $elements = $this->xpath('//select[@id="edit-settings-node-article-settings-language-langcode"]/option');
     // Compare values inside the option elements with expected values.
     for ($i = 0; $i < count($elements); $i++) {
-      $this->assertEqual($elements[$i]->attributes()->{'value'}, $expected_elements[$i]);
+      $this->assertEqual($elements[$i]->getValue(), $expected_elements[$i]);
     }
   }
 
similarity index 98%
rename from web/core/modules/content_translation/src/Tests/ContentTranslationSyncImageTest.php
rename to web/core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php
index 30ff32de5224908e1bb4f4f73f656f17366c4f7c..5f7c9fd9b8ecebf885a4a5e8b4f82379103c83db 100644 (file)
@@ -1,11 +1,12 @@
 <?php
 
-namespace Drupal\content_translation\Tests;
+namespace Drupal\Tests\content_translation\Functional;
 
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
 use Drupal\file\Entity\File;
+use Drupal\Tests\TestFileCreationTrait;
 
 /**
  * Tests the field synchronization behavior for the image field.
@@ -14,6 +15,10 @@ use Drupal\file\Entity\File;
  */
 class ContentTranslationSyncImageTest extends ContentTranslationTestBase {
 
+  use TestFileCreationTrait {
+    getTestFiles as drupalGetTestFiles;
+  }
+
   /**
    * The cardinality of the image field.
    *
similarity index 86%
rename from web/core/modules/content_translation/src/Tests/Views/ContentTranslationViewsUITest.php
rename to web/core/modules/content_translation/tests/src/Functional/Views/ContentTranslationViewsUITest.php
index 07b5d00b0845d27634215f5c4094f6c6eb832b7c..4b4d53a484d8780c225fc5c0ca64a7b5f0049d46 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-namespace Drupal\content_translation\Tests\Views;
+namespace Drupal\Tests\content_translation\Functional\Views;
 
-use Drupal\views_ui\Tests\UITestBase;
+use Drupal\Tests\views_ui\Functional\UITestBase;
 
 /**
  * Tests the views UI when content_translation is enabled.
similarity index 92%
rename from web/core/modules/content_translation/src/Tests/Views/TranslationLinkTest.php
rename to web/core/modules/content_translation/tests/src/Functional/Views/TranslationLinkTest.php
index 23c74a40f541aa2d80de1e03a98c9c24d3ad7176..d2e9e0d0cbeda0f4a8df093a6aedd1d08d1014c6 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-namespace Drupal\content_translation\Tests\Views;
+namespace Drupal\Tests\content_translation\Functional\Views;
 
-use Drupal\content_translation\Tests\ContentTranslationTestBase;
+use Drupal\Tests\content_translation\Functional\ContentTranslationTestBase;
 use Drupal\views\Tests\ViewTestData;
 use Drupal\Core\Language\Language;
 use Drupal\user\Entity\User;
index f81983637fb01102d0b95823385676e480a51532..cc1f9fa9054a31a79ec2e73e7fc8c0e3ddf25ebd 100644 (file)
@@ -151,15 +151,18 @@ function field_test_entity_extra_field_info_alter(&$info) {
  * Implements hook_entity_bundle_field_info_alter().
  */
 function field_test_entity_bundle_field_info_alter(&$fields, EntityTypeInterface $entity_type, $bundle) {
-  if (($field_name = \Drupal::state()->get('field_test_set_constraint', FALSE)) && $entity_type->id() == 'entity_test' && $bundle == 'entity_test' && !empty($fields[$field_name])) {
+  if (($field_name = \Drupal::state()->get('field_test_constraint', FALSE)) && $entity_type->id() == 'entity_test' && $bundle == 'entity_test' && !empty($fields[$field_name])) {
+    // Set a property constraint using
+    // \Drupal\Core\Field\FieldConfigInterface::setPropertyConstraints().
     $fields[$field_name]->setPropertyConstraints('value', [
-      'Range' => [
-        'min' => 0,
-        'max' => 32,
+      'TestField' => [
+        'value' => -2,
+        'message' => t('%name does not accept the value @value.', ['%name' => $field_name, '@value' => -2]),
       ],
     ]);
-  }
-  if (($field_name = \Drupal::state()->get('field_test_add_constraint', FALSE)) && $entity_type->id() == 'entity_test' && $bundle == 'entity_test' && !empty($fields[$field_name])) {
+
+    // Add a property constraint using
+    // \Drupal\Core\Field\FieldConfigInterface::addPropertyConstraints().
     $fields[$field_name]->addPropertyConstraints('value', [
       'Range' => [
         'min' => 0,
index 87441dc4079b3e15e058c1592be671d44fc691f6..08fe18c5c2a66b8bb06ae83fd768db04315c8ffa 100644 (file)
@@ -12,6 +12,8 @@ use Drupal\field\Entity\FieldConfig;
 /**
  * Create field entities by attaching fields to entities.
  *
+ * @coversDefaultClass \Drupal\Core\Field\FieldConfigBase
+ *
  * @group field
  */
 class FieldCrudTest extends FieldKernelTestBase {
@@ -64,10 +66,6 @@ class FieldCrudTest extends FieldKernelTestBase {
    * Test the creation of a field.
    */
   public function testCreateField() {
-    // Set a state flag so that field_test.module knows to add an in-memory
-    // constraint for this field.
-    \Drupal::state()->set('field_test_add_constraint', $this->fieldStorage->getName());
-    /** @var \Drupal\Core\Field\FieldConfigInterface $field */
     $field = FieldConfig::create($this->fieldDefinition);
     $field->save();
 
@@ -100,17 +98,6 @@ class FieldCrudTest extends FieldKernelTestBase {
     // Check that the denormalized 'field_type' was properly written.
     $this->assertEqual($config['field_type'], $this->fieldStorageDefinition['type']);
 
-    // Test constraints are applied. A Range constraint is added dynamically to
-    // limit the field to values between 0 and 32.
-    // @see field_test_entity_bundle_field_info_alter()
-    $this->doFieldValidationTests();
-
-    // Test FieldConfigBase::setPropertyConstraints().
-    \Drupal::state()->set('field_test_set_constraint', $this->fieldStorage->getName());
-    \Drupal::state()->set('field_test_add_constraint', FALSE);
-    \Drupal::entityManager()->clearCachedFieldDefinitions();
-    $this->doFieldValidationTests();
-
     // Guarantee that the field/bundle combination is unique.
     try {
       FieldConfig::create($this->fieldDefinition)->save();
@@ -133,6 +120,81 @@ class FieldCrudTest extends FieldKernelTestBase {
     // TODO: test other failures.
   }
 
+  /**
+   * Tests setting and adding property constraints to a configurable field.
+   *
+   * @covers ::setPropertyConstraints
+   * @covers ::addPropertyConstraints
+   */
+  public function testFieldPropertyConstraints() {
+    $field = FieldConfig::create($this->fieldDefinition);
+    $field->save();
+    $field_name = $this->fieldStorage->getName();
+
+    // Test that constraints are applied to configurable fields. A TestField and
+    // a Range constraint are added dynamically to limit the field to values
+    // between 0 and 32.
+    // @see field_test_entity_bundle_field_info_alter()
+    \Drupal::state()->set('field_test_constraint', $field_name);
+
+    // Clear the field definitions cache so the new constraints added by
+    // field_test_entity_bundle_field_info_alter() are taken into consideration.
+    \Drupal::service('entity_field.manager')->clearCachedFieldDefinitions();
+
+    // Test the newly added property constraints in the same request as when the
+    // caches were cleared. This will test the field definitions that are stored
+    // in the static cache of
+    // \Drupal\Core\Entity\EntityFieldManager::getFieldDefinitions().
+    $this->doFieldPropertyConstraintsTests();
+
+    // In order to test a real-world scenario where the property constraints are
+    // only stored in the persistent cache of
+    // \Drupal\Core\Entity\EntityFieldManager::getFieldDefinitions(), we need to
+    // simulate a new request by removing the 'entity_field.manager' service,
+    // thus forcing it to be re-initialized without static caches.
+    \Drupal::getContainer()->set('entity_field.manager', NULL);
+
+    // This will test the field definitions that are stored in the persistent
+    // cache by \Drupal\Core\Entity\EntityFieldManager::getFieldDefinitions().
+    $this->doFieldPropertyConstraintsTests();
+  }
+
+  /**
+   * Tests configurable field validation.
+   *
+   * @see field_test_entity_bundle_field_info_alter()
+   */
+  protected function doFieldPropertyConstraintsTests() {
+    $field_name = $this->fieldStorage->getName();
+
+    // Check that a valid value (not -2 and between 0 and 32) doesn't trigger
+    // any violation.
+    $entity = EntityTest::create();
+    $entity->set($field_name, 1);
+    $violations = $entity->validate();
+    $this->assertCount(0, $violations, 'No violations found when in-range value passed.');
+
+    // Check that a value that is specifically restricted triggers both
+    // violations.
+    $entity->set($field_name, -2);
+    $violations = $entity->validate();
+    $this->assertCount(2, $violations, 'Two violations found when using a null and outside the range value.');
+
+    $this->assertEquals($field_name . '.0.value', $violations[0]->getPropertyPath());
+    $this->assertEquals(t('%name does not accept the value @value.', ['%name' => $field_name, '@value' => -2]), $violations[0]->getMessage());
+
+    $this->assertEquals($field_name . '.0.value', $violations[1]->getPropertyPath());
+    $this->assertEquals(t('This value should be %limit or more.', ['%limit' => 0]), $violations[1]->getMessage());
+
+    // Check that a value that is not specifically restricted but outside the
+    // range triggers the expected violation.
+    $entity->set($field_name, 33);
+    $violations = $entity->validate();
+    $this->assertCount(1, $violations, 'Violations found when using value outside the range.');
+    $this->assertEquals($field_name . '.0.value', $violations[0]->getPropertyPath());
+    $this->assertEquals(t('This value should be %limit or less.', ['%limit' => 32]), $violations[0]->getMessage());
+  }
+
   /**
    * Test creating a field with custom storage set.
    */
@@ -280,24 +342,4 @@ class FieldCrudTest extends FieldKernelTestBase {
     $this->assertFalse(FieldStorageConfig::loadByName('entity_test', $field_storage->getName()));
   }
 
-  /**
-   * Tests configurable field validation.
-   *
-   * @see field_test_entity_bundle_field_info_alter()
-   */
-  protected function doFieldValidationTests() {
-    $entity = EntityTest::create();
-    $entity->set($this->fieldStorage->getName(), 1);
-    $violations = $entity->validate();
-    $this->assertEqual(count($violations), 0, 'No violations found when in-range value passed.');
-
-    $entity->set($this->fieldStorage->getName(), 33);
-    $violations = $entity->validate();
-    $this->assertEqual(count($violations), 1, 'Violations found when using value outside the range.');
-    $this->assertEqual($violations[0]->getPropertyPath(), $this->fieldStorage->getName() . '.0.value');
-    $this->assertEqual($violations[0]->getMessage(), t('This value should be %limit or less.', [
-      '%limit' => 32,
-    ]));
-  }
-
 }
index 7b35aff9c82bfee8b294120280427bafe174acf4..3fee046623ee546dada0a12749b677fc4ea05527 100644 (file)
@@ -6,6 +6,7 @@ migration_tags:
   - Drupal 7
 source:
   plugin: d7_file
+  scheme: public
   constants:
     # The tool configuring this migration must set source_base_path. It
     # represents the fully qualified path relative to which URIs in the files
diff --git a/web/core/modules/file/migration_templates/d7_file_private.yml b/web/core/modules/file/migration_templates/d7_file_private.yml
new file mode 100644 (file)
index 0000000..9c6b8e2
--- /dev/null
@@ -0,0 +1,39 @@
+id: d7_file_private
+label: Files
+migration_tags:
+  - Drupal 7
+source:
+  plugin: d7_file
+  scheme: private
+  constants:
+    # source_base_path must be set by the tool configuring this migration.
+    # It represents the fully qualified path relative to which uris in the files
+    # table are specified, and must end with a /. See source_full_path
+    # configuration in this migration's process pipeline as an example.
+    source_base_path: ''
+process:
+  # If you are using this file to build a custom migration consider removing
+  # the fid field to allow incremental migrations.
+  fid: fid
+  filename: filename
+  source_full_path:
+    -
+      plugin: concat
+      delimiter: /
+      source:
+        - constants/source_base_path
+        - filepath
+  uri:
+    plugin: file_copy
+    source:
+      - '@source_full_path'
+      - uri
+  filemime: filemime
+  status: status
+  # Drupal 7 didn't keep track of the file's creation or update time -- all it
+  # had was the vague "timestamp" column. So we'll use it for both.
+  created: timestamp
+  changed: timestamp
+  uid: uid
+destination:
+  plugin: entity:file
diff --git a/web/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php b/web/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php
new file mode 100644 (file)
index 0000000..7b6f763
--- /dev/null
@@ -0,0 +1,98 @@
+<?php
+
+namespace Drupal\Tests\file\Kernel\Migrate\d7;
+
+use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\file\Entity\File;
+use Drupal\file\FileInterface;
+use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
+
+/**
+ * Tests private files migration.
+ *
+ * @group file
+ */
+class MigratePrivateFileTest extends MigrateDrupal7TestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['file'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    $this->setSetting('file_private_path', $this->container->get('site.path') . '/private');
+    $this->installEntitySchema('file');
+    $fs = $this->container->get('file_system');
+
+    // Ensure that the private files directory exists.
+    $fs->mkdir('private://sites/default/private/', NULL, TRUE);
+    // Put test file in the source directory.
+    file_put_contents('private://sites/default/private/Babylon5.txt', str_repeat('*', 3));
+
+    /** @var \Drupal\migrate\Plugin\Migration $migration */
+    $migration = $this->getMigration('d7_file_private');
+    // Set the source plugin's source_file_private_path configuration value,
+    // which would normally be set by the user running the migration.
+    $source = $migration->getSourceConfiguration();
+    $source['constants']['source_base_path'] = $fs->realpath('private://');
+    $migration->set('source', $source);
+    $this->executeMigration($migration);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function register(ContainerBuilder $container) {
+    parent::register($container);
+    $container->register('stream_wrapper.private', 'Drupal\Core\StreamWrapper\PrivateStream')
+      ->addTag('stream_wrapper', ['scheme' => 'private']);
+  }
+
+  /**
+   * Tests a single file entity.
+   *
+   * @param int $id
+   *   The file ID.
+   * @param string $name
+   *   The expected file name.
+   * @param string $uri
+   *   The expected URI.
+   * @param string $mime
+   *   The expected MIME type.
+   * @param int $size
+   *   The expected file size.
+   * @param int $created
+   *   The expected creation time.
+   * @param int $changed
+   *   The expected modification time.
+   * @param int $uid
+   *   The expected owner ID.
+   */
+  protected function assertEntity($id, $name, $uri, $mime, $size, $created, $changed, $uid) {
+    /** @var \Drupal\file\FileInterface $file */
+    $file = File::load($id);
+    $this->assertInstanceOf(FileInterface::class, $file);
+    $this->assertSame($name, $file->getFilename());
+    $this->assertSame($uri, $file->getFileUri());
+    $this->assertFileExists($uri);
+    $this->assertSame($mime, $file->getMimeType());
+    $this->assertSame($size, $file->getSize());
+    // isPermanent(), isTemporary(), etc. are determined by the status column.
+    $this->assertTrue($file->isPermanent());
+    $this->assertSame($created, $file->getCreatedTime());
+    $this->assertSame($changed, $file->getChangedTime());
+    $this->assertSame($uid, $file->getOwnerId());
+  }
+
+  /**
+   * Tests that all expected files are migrated.
+   */
+  public function testFileMigration() {
+    $this->assertEntity(3, 'Babylon5.txt', 'private://Babylon5.txt', 'text/plain', '3', '1486104045', '1486104045', '1');
+  }
+
+}
index 8c7a160167c23d22b70db79a2c5b15a67364c98a..ae8fb9da642db22137335d90046875c69343987d 100644 (file)
@@ -40,12 +40,16 @@ class FilterFormatPermission extends ProcessPluginBase implements ContainerFacto
    * {@inheritdoc}
    */
   public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) {
+    $migration_plugin_configuration = $configuration + [
+      'migration' => 'd6_filter_format',
+    ];
+
     return new static(
       $configuration,
       $plugin_id,
       $plugin_definition,
       $migration,
-      $container->get('plugin.manager.migrate.process')->createInstance('migration', ['migration' => 'd6_filter_format'], $migration)
+      $container->get('plugin.manager.migrate.process')->createInstance('migration', $migration_plugin_configuration, $migration)
     );
   }
 
diff --git a/web/core/modules/filter/tests/src/Kernel/Migrate/d6/FilterFormatPermissionTest.php b/web/core/modules/filter/tests/src/Kernel/Migrate/d6/FilterFormatPermissionTest.php
new file mode 100644 (file)
index 0000000..80b0c7d
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+
+namespace Drupal\Tests\filter\Kernel\Migrate\d6;
+
+use Drupal\filter\Plugin\migrate\process\d6\FilterFormatPermission;
+use Drupal\migrate\Plugin\Migration;
+use Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase;
+
+/**
+ * Tests conversion of format serial to string id in permission name.
+ *
+ * @coversDefaultClass \Drupal\filter\Plugin\migrate\process\d6\FilterFormatPermission
+ *
+ * @group filter
+ */
+class FilterFormatPermissionTest extends MigrateDrupalTestBase {
+
+  /**
+   * Tests configurability of filter_format migration name.
+   *
+   * @covers ::__construct
+   */
+  public function testConfigurableFilterFormat() {
+    $migration = Migration::create($this->container, [], 'custom_migration', []);
+    $filterFormatPermissionMigration = FilterFormatPermission::create($this->container, ['migration' => 'custom_filter_format'], 'custom_filter_format', [], $migration);
+    $migrationPlugin = $this->readAttribute($filterFormatPermissionMigration, 'migrationPlugin');
+    $config = $this->readAttribute($migrationPlugin, 'configuration');
+
+    $this->assertEquals($config['migration'], 'custom_filter_format');
+  }
+
+}
similarity index 92%
rename from web/core/modules/forum/src/Tests/Views/ForumIntegrationTest.php
rename to web/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php
index f5677e41b6a9314c17cab7ed095826889403ffd2..19c000012d7cf6410e8154276c06ec0c503abb7d 100644 (file)
@@ -1,10 +1,10 @@
 <?php
 
-namespace Drupal\forum\Tests\Views;
+namespace Drupal\Tests\forum\Functional\Views;
 
 use Drupal\node\NodeInterface;
 use Drupal\views\Views;
-use Drupal\views\Tests\ViewTestBase;
+use Drupal\Tests\views\Functional\ViewTestBase;
 use Drupal\views\Tests\ViewTestData;
 
 /**
@@ -28,8 +28,8 @@ class ForumIntegrationTest extends ViewTestBase {
    */
   public static $testViews = ['test_forum_index'];
 
-  protected function setUp() {
-    parent::setUp();
+  protected function setUp($import_test_views = TRUE) {
+    parent::setUp($import_test_views);
 
     ViewTestData::createTestViews(get_class($this), ['forum_test_views']);
   }
index 3146e12c58b2a643d314563adc9ee6284d82f553..a33b6c32bbd3fad06d602e88cf233457a3bd18ca 100644 (file)
@@ -72,6 +72,7 @@ class RelationLinkManager extends LinkManagerBase implements RelationLinkManager
     $this->moduleHandler->alter('hal_relation_uri', $uri, $context);
     // @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. This
     // hook is invoked to maintain backwards compatibility
+    // @see https://www.drupal.org/node/2830467
     $this->moduleHandler->alter('rest_relation_uri', $uri, $context);
     return $uri;
   }
index c3a948ff86eb85d89c0e37626ece38b98cb7df11..51b2de5032c5ed7f94e8cb025aad9bb1a1606dc8 100644 (file)
@@ -73,6 +73,7 @@ class TypeLinkManager extends LinkManagerBase implements TypeLinkManagerInterfac
     $this->moduleHandler->alter('hal_type_uri', $uri, $context);
     // @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. This
     // hook is invoked to maintain backwards compatibility
+    // @see https://www.drupal.org/node/2830467
     $this->moduleHandler->alter('rest_type_uri', $uri, $context);
     return $uri;
   }
index 8788eaf41eac1039848b74be06ff4bcb0a2cbceb..82363458715853750379b2c7ded95863ef80e843 100644 (file)
@@ -27,6 +27,8 @@ function hal_test_hal_relation_uri_alter(&$uri, $context = []) {
  * Implements hook_rest_type_uri_alter().
  *
  * @deprecated Kept only for BC test coverage, see \Drupal\Tests\hal\Kernel\HalLinkManagerTest::testGetTypeUri().
+ *
+ * @see https://www.drupal.org/node/2830467
  */
 function hal_test_rest_type_uri_alter(&$uri, $context = []) {
   if (!empty($context['rest_test'])) {
@@ -38,6 +40,8 @@ function hal_test_rest_type_uri_alter(&$uri, $context = []) {
  * Implements hook_rest_relation_uri_alter().
  *
  * @deprecated Kept only for BC test coverage, see \Drupal\Tests\hal\Kernel\HalLinkManagerTest::testGetRelationUri().
+ *
+ * @see https://www.drupal.org/node/2830467
  */
 function hal_test_rest_relation_uri_alter(&$uri, $context = []) {
   if (!empty($context['rest_test'])) {
index 0dabde37ce1f9dc8baa29f5c08913ed590fb8830..34cfd4be572ec0f5d7d135b9b0ad59b0b1dd5c7b 100644 (file)
@@ -6,7 +6,7 @@ use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
 use Drupal\Tests\rest\Functional\EntityResource\ImageStyle\ImageStyleResourceTestBase;
 
 /**
- * @group rest
+ * @group hal
  */
 class ImageStyleHalJsonAnonTest extends ImageStyleResourceTestBase {
 
index 2e4d3eb509755e3d350bee08b6a99bfbe2271c60..61cc149e3b34c9b81a71cb405d5f930596fa4c97 100644 (file)
@@ -6,7 +6,7 @@ use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
 use Drupal\Tests\rest\Functional\EntityResource\ImageStyle\ImageStyleResourceTestBase;
 
 /**
- * @group rest
+ * @group hal
  */
 class ImageStyleHalJsonBasicAuthTest extends ImageStyleResourceTestBase {
 
index b0f57b96381af193b9c9f19944ab58666cfb4e95..aa496535cd89c3555c0b84390258b4000c8ea942 100644 (file)
@@ -6,7 +6,7 @@ use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
 use Drupal\Tests\rest\Functional\EntityResource\ImageStyle\ImageStyleResourceTestBase;
 
 /**
- * @group rest
+ * @group hal
  */
 class ImageStyleHalJsonCookieTest extends ImageStyleResourceTestBase {
 
index e9cb157abe155953d5821e400a85396aefda2021..3207442ab272543e12d2ba0c444411cfdbd359d9 100644 (file)
@@ -3,7 +3,7 @@
 namespace Drupal\Tests\image\Functional;
 
 use Drupal\image\Entity\ImageStyle;
-use Drupal\system\Tests\Image\ToolkitTestBase;
+use Drupal\FunctionalTests\Image\ToolkitTestBase;
 
 /**
  * Tests that the image effects pass parameters to the toolkit correctly.
diff --git a/web/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentSettingsTest.php b/web/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentSettingsTest.php
new file mode 100644 (file)
index 0000000..a4c7534
--- /dev/null
@@ -0,0 +1,74 @@
+<?php
+
+namespace Drupal\Tests\language\Kernel\Plugin\migrate\source\d6;
+
+use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
+
+/**
+ * Tests menu source plugin.
+ *
+ * @covers \Drupal\language\Plugin\migrate\source\d6\LanguageContentSettings
+ *
+ * @group language
+ */
+class LanguageContentSettingsTest extends MigrateSqlSourceTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['language', 'migrate_drupal'];
+
+  /**
+   * {@inheritdoc}
+   */
+  public function providerSource() {
+    $tests = [];
+
+    // The source data.
+    $tests[0]['source_data']['node_type'] = [
+      [
+        'type' => 'article',
+        'name' => 'Article',
+        'module' => 'node',
+        'description' => 'An <em>article</em>, content type.',
+        'help' => '',
+        'has_title' => 1,
+        'title_label' => 'Title',
+        'has_body' => 1,
+        'body_label' => 'Body',
+        'min_word_count' => 0,
+        'custom' => 1,
+        'modified' => 1,
+        'locked' => 0,
+        'orig_type' => 'story',
+      ],
+      [
+        'type' => 'company',
+        'name' => 'Company',
+        'module' => 'node',
+        'description' => 'Company node type',
+        'help' => '',
+        'has_title' => 1,
+        'title_label' => 'Name',
+        'has_body' => 1,
+        'body_label' => 'Description',
+        'min_word_count' => 0,
+        'custom' => 0,
+        'modified' => 1,
+        'locked' => 0,
+        'orig_type' => 'company',
+      ],
+    ];
+
+    foreach ($tests[0]['source_data']['node_type'] as $node_type) {
+      $tests[0]['expected_data'][] = [
+        'type' => $node_type['type'],
+        'language_content_type' => NULL,
+        'i18n_lock_node' => 0,
+      ];
+    }
+
+    return $tests;
+  }
+
+}
diff --git a/web/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentSettingsTest.php b/web/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentSettingsTest.php
new file mode 100644 (file)
index 0000000..39d6450
--- /dev/null
@@ -0,0 +1,72 @@
+<?php
+
+namespace Drupal\Tests\language\Kernel\Plugin\migrate\source\d7;
+
+use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
+
+/**
+ * Tests menu source plugin.
+ *
+ * @covers \Drupal\language\Plugin\migrate\source\d7\LanguageContentSettings
+ *
+ * @group language
+ */
+class LanguageContentSettingsTest extends MigrateSqlSourceTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['language', 'migrate_drupal'];
+
+  /**
+   * {@inheritdoc}
+   */
+  public function providerSource() {
+    $tests = [];
+
+    // The source data.
+    $tests[0]['source_data']['node_type'] = [
+      [
+        'type' => 'article',
+        'name' => 'Article',
+        'base' => 'node_content',
+        'module' => 'node',
+        'description' => 'Use <em>articles</em> for time-sensitive content like news, press releases or blog posts.',
+        'help' => 'Help text for articles',
+        'has_title' => 1,
+        'title_label' => 'Title',
+        'custom' => 1,
+        'modified' => 1,
+        'locked' => 0,
+        'disabled' => 0,
+        'orig_type' => 'article',
+      ],
+      [
+        'type' => 'blog',
+        'name' => 'Blog entry',
+        'base' => 'blog',
+        'module' => 'blog',
+        'description' => 'Use for multi-user blogs. Every user gets a personal blog.',
+        'help' => 'Blog away, good sir!',
+        'has_title' => 1,
+        'title_label' => 'Title',
+        'custom' => 0,
+        'modified' => 1,
+        'locked' => 1,
+        'disabled' => 0,
+        'orig_type' => 'blog',
+      ],
+    ];
+
+    foreach ($tests[0]['source_data']['node_type'] as $node_type) {
+      $tests[0]['expected_data'][] = [
+        'type' => $node_type['type'],
+        'language_content_type' => NULL,
+        'i18n_lock_node' => 0,
+      ];
+    }
+
+    return $tests;
+  }
+
+}
index 29a816fce5267e888431e42eb48113d6779daac3..7f651176789794ac96184b819bd7de6c68c7c0bf 100644 (file)
 
 @media screen and (min-width: 40em) {
   .layout--threecol-33-34-33 > .layout__region--first,
-  .layout--threecol-33-34-33 > .layout__region--second,
   .layout--threecol-33-34-33 > .layout__region--third {
     flex: 0 1 33%;
   }
+  .layout--threecol-33-34-33 > .layout__region--second {
+    flex: 0 1 34%;
+  }
 }
similarity index 98%
rename from web/core/modules/locale/src/Tests/LocaleConfigTranslationImportTest.php
rename to web/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php
index 479a60046bf55fb50a6bbee19c7a1ea8d2dff154..67c2dfa7078eccc95fae18e1e22d848f6b70ea95 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
 use Drupal\locale\Locale;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 use Drupal\language\Entity\ConfigurableLanguage;
 
 /**
@@ -11,7 +11,7 @@ use Drupal\language\Entity\ConfigurableLanguage;
  *
  * @group locale
  */
-class LocaleConfigTranslationImportTest extends WebTestBase {
+class LocaleConfigTranslationImportTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
@@ -206,7 +206,7 @@ class LocaleConfigTranslationImportTest extends WebTestBase {
     $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
     $textareas = $this->xpath('//textarea');
     $textarea = current($textareas);
-    $lid = (string) $textarea[0]['name'];
+    $lid = $textarea->getAttribute('name');
     $edit = [
       $lid => '',
     ];
similarity index 97%
rename from web/core/modules/locale/src/Tests/LocaleConfigTranslationTest.php
rename to web/core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php
index a90dce0c54c8ff3bc3b1c995a4bf3376a62d551c..4d1b9df2cd6bd70f71c976aa76152966a47715fb 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 use Drupal\Core\Language\LanguageInterface;
 
 /**
@@ -10,7 +10,7 @@ use Drupal\Core\Language\LanguageInterface;
  *
  * @group locale
  */
-class LocaleConfigTranslationTest extends WebTestBase {
+class LocaleConfigTranslationTest extends BrowserTestBase {
 
   /**
    * The language code used.
@@ -76,7 +76,7 @@ class LocaleConfigTranslationTest extends WebTestBase {
     $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
     $textareas = $this->xpath('//textarea');
     $textarea = current($textareas);
-    $lid = (string) $textarea[0]['name'];
+    $lid = $textarea->getAttribute('name');
     $edit = [
       $lid => $message,
     ];
@@ -100,7 +100,7 @@ class LocaleConfigTranslationTest extends WebTestBase {
     $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
     $textareas = $this->xpath('//textarea');
     $textarea = current($textareas);
-    $lid = (string) $textarea[0]['name'];
+    $lid = $textarea->getAttribute('name');
     $edit = [
       $lid => 'D',
     ];
@@ -143,7 +143,7 @@ class LocaleConfigTranslationTest extends WebTestBase {
     ];
     $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = $textarea->getAttribute('name');
     $edit = [
       $lid => $image_style_label,
     ];
@@ -175,7 +175,7 @@ class LocaleConfigTranslationTest extends WebTestBase {
     ];
     $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = $textarea->getAttribute('name');
     $edit = [
       $lid => $category_label,
     ];
similarity index 97%
rename from web/core/modules/locale/src/Tests/LocaleExportTest.php
rename to web/core/modules/locale/tests/src/Functional/LocaleExportTest.php
index 54d36e2bc80c123759a94e1a5a1dc054b1f9111f..05621f6c13dec094de4058781d73b9630bb43f73 100644 (file)
@@ -1,15 +1,15 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests the exportation of locale files.
  *
  * @group locale
  */
-class LocaleExportTest extends WebTestBase {
+class LocaleExportTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
similarity index 91%
rename from web/core/modules/locale/src/Tests/LocaleFileSystemFormTest.php
rename to web/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php
index 3ac296abe27c0484e177aa84d7d0e82be40b83b1..face32e69b683751f0b9f18d531428707a61268a 100644 (file)
@@ -1,15 +1,15 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests the locale functionality in the altered file settings form.
  *
  * @group locale
  */
-class LocaleFileSystemFormTest extends WebTestBase {
+class LocaleFileSystemFormTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
similarity index 99%
rename from web/core/modules/locale/src/Tests/LocaleImportFunctionalTest.php
rename to web/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php
index c1d9a612a9c93d5383b4f79bea453cf1b83c5631..e3a2c2612e2bf5a4ff989d092cd884fb60516fcd 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 use Drupal\Core\Language\LanguageInterface;
 
 /**
@@ -10,7 +10,7 @@ use Drupal\Core\Language\LanguageInterface;
  *
  * @group locale
  */
-class LocaleImportFunctionalTest extends WebTestBase {
+class LocaleImportFunctionalTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
similarity index 92%
rename from web/core/modules/locale/src/Tests/LocaleJavascriptTranslationTest.php
rename to web/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php
index fe99ce2f37c424c3680c17dd542616cf4d72ce98..bbb825832b77324c3f9e1d4ecbf8e64419ce2c6b 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
 use Drupal\Core\Language\LanguageInterface;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 use Drupal\Component\Utility\SafeMarkup;
 
 /**
@@ -11,7 +11,7 @@ use Drupal\Component\Utility\SafeMarkup;
  *
  * @group locale
  */
-class LocaleJavascriptTranslationTest extends WebTestBase {
+class LocaleJavascriptTranslationTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
@@ -21,7 +21,7 @@ class LocaleJavascriptTranslationTest extends WebTestBase {
   public static $modules = ['locale', 'locale_test'];
 
   public function testFileParsing() {
-    $filename = __DIR__ . '/../../tests/locale_test.js';
+    $filename = __DIR__ . '/../../locale_test.js';
 
     // Parse the file to look for source strings.
     _locale_parse_js_file($filename);
@@ -138,8 +138,9 @@ class LocaleJavascriptTranslationTest extends WebTestBase {
     $js_translation_files = \Drupal::state()->get('locale.translation.javascript');
     $js_filename = $prefix . '_' . $js_translation_files[$prefix] . '.js';
 
+    $content = $this->getSession()->getPage()->getContent();
     // Assert translations JS is included before drupal.js.
-    $this->assertTrue(strpos($this->content, $js_filename) < strpos($this->content, 'core/misc/drupal.js'), 'Translations are included before Drupal.t.');
+    $this->assertTrue(strpos($content, $js_filename) < strpos($content, 'core/misc/drupal.js'), 'Translations are included before Drupal.t.');
   }
 
 }
similarity index 85%
rename from web/core/modules/locale/src/Tests/LocaleLibraryAlterTest.php
rename to web/core/modules/locale/tests/src/Functional/LocaleLibraryAlterTest.php
index 68996f44a20884c3d769769983788fa5af2b0673..5425fc5f4c47f891357f0ea8e0efa761659dea42 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
 use Drupal\Core\Asset\AttachedAssets;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests localization of the JavaScript libraries.
@@ -12,7 +12,7 @@ use Drupal\simpletest\WebTestBase;
  *
  * @group locale
  */
-class LocaleLibraryAlterTest extends WebTestBase {
+class LocaleLibraryAlterTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
similarity index 99%
rename from web/core/modules/locale/src/Tests/LocalePluralFormatTest.php
rename to web/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php
index 2315dbd22b4d9f63cc560a42e47567b00e11d6d2..57916caf04ca555270b5bef3e3ce1023e33ec624 100644 (file)
@@ -1,16 +1,16 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
 use Drupal\Core\StringTranslation\PluralTranslatableMarkup;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests plural handling for various languages.
  *
  * @group locale
  */
-class LocalePluralFormatTest extends WebTestBase {
+class LocalePluralFormatTest extends BrowserTestBase {
 
   /**
    * An admin user.
similarity index 96%
rename from web/core/modules/locale/src/Tests/LocaleTranslateStringTourTest.php
rename to web/core/modules/locale/tests/src/Functional/LocaleTranslateStringTourTest.php
index a4b1656655b92a9723f69734450ac6435aa9bdfe..397c1c763f8b7857be15ff64b66c3a5cdca577e3 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
 use Drupal\tour\Tests\TourTestBase;
 
similarity index 96%
rename from web/core/modules/locale/src/Tests/LocaleTranslationUiTest.php
rename to web/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php
index 53f77c19fd2c005fd2cf1fa7146e6b2b51d64141..e7d28b36834ef2f7f9c4a01d8f754bd1f581b5d5 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
 use Drupal\language\Entity\ConfigurableLanguage;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 use Drupal\Core\Language\LanguageInterface;
 use Drupal\Component\Utility\SafeMarkup;
 
@@ -13,7 +13,7 @@ use Drupal\Component\Utility\SafeMarkup;
  *
  * @group locale
  */
-class LocaleTranslationUiTest extends WebTestBase {
+class LocaleTranslationUiTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
@@ -44,7 +44,7 @@ class LocaleTranslationUiTest extends WebTestBase {
     // Code for the language.
     $langcode = 'xx';
     // The English name for the language. This will be translated.
-    $name = $this->randomMachineName(16);
+    $name = 'cucurbitaceae';
     // This will be the translation of $name.
     $translation = $this->randomMachineName(16);
     $translation_to_en = $this->randomMachineName(16);
@@ -89,7 +89,7 @@ class LocaleTranslationUiTest extends WebTestBase {
 
     // Assume this is the only result, given the random name.
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = $textarea->getAttribute('name');
     $edit = [
       $lid => $translation,
     ];
@@ -112,7 +112,7 @@ class LocaleTranslationUiTest extends WebTestBase {
     ];
     $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = $textarea->getAttribute('name');
     $edit = [
       $lid => $translation_to_en,
     ];
@@ -155,7 +155,7 @@ class LocaleTranslationUiTest extends WebTestBase {
     ];
     $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = $textarea->getAttribute('name');
     $edit = [
       $lid => 'Please enter your Llama username.',
     ];
@@ -189,7 +189,7 @@ class LocaleTranslationUiTest extends WebTestBase {
     $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
     // Assume this is the only result, given the random name.
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = $textarea->getAttribute('name');
     $edit = [
       $lid => '',
     ];
@@ -248,7 +248,7 @@ class LocaleTranslationUiTest extends WebTestBase {
     $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
 
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = $textarea->getAttribute('name');
     $edit = [
       $lid => $this->randomMachineName(),
     ];
@@ -309,7 +309,7 @@ class LocaleTranslationUiTest extends WebTestBase {
     // Find the edit path.
 
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = $textarea->getAttribute('name');
     foreach ($bad_translations as $translation) {
       $edit = [
         $lid => $translation,
@@ -317,7 +317,7 @@ class LocaleTranslationUiTest extends WebTestBase {
       $this->drupalPostForm('admin/config/regional/translate', $edit, t('Save translations'));
       // Check for a form error on the textarea.
       $form_class = $this->xpath('//form[@id="locale-translate-edit-form"]//textarea/@class');
-      $this->assertNotIdentical(FALSE, strpos($form_class[0], 'error'), 'The string was rejected as unsafe.');
+      $this->assertContains('error', $form_class[0]->getText(), 'The string was rejected as unsafe.');
       $this->assertNoText(t('The string has been saved.'), 'The string was not saved.');
     }
   }
@@ -399,7 +399,7 @@ class LocaleTranslationUiTest extends WebTestBase {
     // Assume this is the only result, given the random name.
     // We save the lid from the path.
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = $textarea->getAttribute('name');
     $edit = [
       $lid => $translation,
     ];
@@ -503,7 +503,7 @@ class LocaleTranslationUiTest extends WebTestBase {
 
     // Submit the translations without changing the translation.
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = $textarea->getAttribute('name');
     $edit = [
       $lid => $translation->getString(),
     ];
@@ -522,7 +522,7 @@ class LocaleTranslationUiTest extends WebTestBase {
 
     // Submit the translations with a new translation.
     $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
+    $lid = $textarea->getAttribute('name');
     $edit = [
       $lid => $this->randomMachineName(100),
     ];
similarity index 98%
rename from web/core/modules/locale/src/Tests/LocaleUpdateBase.php
rename to web/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php
index b228a962de5f7dab19d7899d785fb7a3dbb02834..f4c59b2873b4fa6a6eb841111a6509976dd80454 100644 (file)
@@ -1,16 +1,16 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
 use Drupal\Core\StreamWrapper\PublicStream;
 use Drupal\file\Entity\File;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 use Drupal\Component\Utility\SafeMarkup;
 
 /**
  * Base class for testing updates to string translations.
  */
-abstract class LocaleUpdateBase extends WebTestBase {
+abstract class LocaleUpdateBase extends BrowserTestBase {
 
   /**
    * Timestamp for an old translation.
similarity index 97%
rename from web/core/modules/locale/src/Tests/LocaleUpdateCronTest.php
rename to web/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php
index 78a14ecac858c86131628abe3e0ce3dcb64d5f90..d0d5379139422689f26468c4ae03733ac5c59723 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
+
+use Drupal\Tests\Traits\Core\CronRunTrait;
 
 /**
  * Tests for using cron to update project interface translations.
@@ -9,6 +11,8 @@ namespace Drupal\locale\Tests;
  */
 class LocaleUpdateCronTest extends LocaleUpdateBase {
 
+  use CronRunTrait;
+
   protected $batchOutput = [];
 
   /**
similarity index 88%
rename from web/core/modules/locale/src/Tests/LocaleUpdateDevelopmentReleaseTest.php
rename to web/core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php
index 3d7970bb984f3e7576947b47cba3403060c5d293..5c972d1ef377a699001f688763aa0785223d6591 100644 (file)
@@ -1,15 +1,15 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Test for proper version fallback in case of a development release.
  *
  * @group language
  */
-class LocaleUpdateDevelopmentReleaseTest extends WebTestBase {
+class LocaleUpdateDevelopmentReleaseTest extends BrowserTestBase {
 
   public static $modules = ['locale', 'locale_test_development_release'];
 
similarity index 99%
rename from web/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php
rename to web/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php
index 32928b1d8bf3ec39b9f2f7f425053ecd7e979f72..c6c69c2a97e9470516ab93d8a66d7e7f774fa378 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
 use Drupal\Component\Render\FormattableMarkup;
 use Drupal\Component\Utility\SafeMarkup;
similarity index 99%
rename from web/core/modules/locale/src/Tests/LocaleUpdateTest.php
rename to web/core/modules/locale/tests/src/Functional/LocaleUpdateTest.php
index 957419b721530a72b8a28360355595a7666c6367..907e572c428d28cbef1837eb36de58162a58d370 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\locale\Tests;
+namespace Drupal\Tests\locale\Functional;
 
 use Drupal\Core\Language\LanguageInterface;
 
index f387df5233fdb7613aa3c806faf5e541401afc0f..835fd691c9b3bf20c14973f71af72448a1994836 100644 (file)
@@ -217,7 +217,7 @@ class MigrationLookup extends ProcessPluginBase implements ContainerFactoryPlugi
         $values[$source_id] = $source_id_values[$migration->id()][$index];
       }
 
-      $stub_row = new Row($values + $migration->getSourceConfiguration(), $source_ids, TRUE);
+      $stub_row = $this->createStubRow($values + $migration->getSourceConfiguration(), $source_ids);
 
       // Do a normal migration with the stub row.
       $migrate_executable->processRow($stub_row, $process);
@@ -257,4 +257,23 @@ class MigrationLookup extends ProcessPluginBase implements ContainerFactoryPlugi
     }
   }
 
+  /**
+   * Create a stub row source for later import as stub data.
+   *
+   * This simple wrapper of the Row constructor allows sub-classing plugins to
+   * have more control over the row.
+   *
+   * @param array $values
+   *   An array of values to add as properties on the object.
+   * @param array $source_ids
+   *   An array containing the IDs of the source using the keys as the field
+   *   names.
+   *
+   * @return \Drupal\migrate\Row
+   *   The stub row.
+   */
+  protected function createStubRow(array $values, array $source_ids) {
+    return new Row($values, $source_ids, TRUE);
+  }
+
 }
index 3d88d777b7edb1e307a5953d7dcaf7f2eb37afd0..bdb2879282f4d3778a94ca5a7ccb5c1968086937 100644 (file)
@@ -11,5 +11,7 @@ instead.', E_USER_DEPRECATED);
  *
  * @deprecated in Drupal 8.3.x, to be removed before Drupal 9.0.x. Use
  *   \Drupal\migrate_drupal\Plugin\MigrateFieldPluginManagerInterface instead.
+ *
+ * @see https://www.drupal.org/node/2751897
  */
 interface MigrateCckFieldPluginManagerInterface extends MigrateFieldPluginManagerInterface { }
diff --git a/web/core/modules/migrate_drupal/src/Plugin/migrate/field/UserReference.php b/web/core/modules/migrate_drupal/src/Plugin/migrate/field/UserReference.php
new file mode 100644 (file)
index 0000000..4f1a603
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+
+namespace Drupal\migrate_drupal\Plugin\migrate\field;
+
+use Drupal\migrate\Plugin\MigrationInterface;
+
+/**
+ * @MigrateField(
+ *   id = "userreference",
+ *   core = {6},
+ *   type_map = {
+ *     "userreference" = "entity_reference",
+ *   },
+ * )
+ */
+class UserReference extends FieldPluginBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getFieldFormatterMap() {
+    return [];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function processFieldValues(MigrationInterface $migration, $field_name, $data) {
+    $process = [
+      'plugin' => 'iterator',
+      'source' => $field_name,
+      'process' => [
+        'target_id' => [
+          'plugin' => 'migration_lookup',
+          'migration' => 'd6_user',
+          'source' => 'uid',
+        ],
+      ],
+    ];
+    $migration->setProcessOfProperty($field_name, $process);
+  }
+
+}
index c94870e2f4ac67afac1759d1d6dc69a94177fb0f..0003684ebbb44cec3cc46b3a171d4e2351dc83f4 100644 (file)
@@ -45966,28 +45966,28 @@ $connection->insert('term_data')
 ->values(array(
   'tid' => '1',
   'vid' => '1',
-  'name' => 'term 1 of vocabulary 1',
-  'description' => 'description of term 1 of vocabulary 1',
+  'name' => 'zu - term 1 of vocabulary 1',
+  'description' => 'zu - description of term 1 of vocabulary 1',
   'weight' => '0',
-  'language' => '',
+  'language' => 'zu',
   'trid' => '0',
 ))
 ->values(array(
   'tid' => '2',
   'vid' => '2',
-  'name' => 'term 2 of vocabulary 2',
-  'description' => 'description of term 2 of vocabulary 2',
+  'name' => 'fr - term 2 of vocabulary 2',
+  'description' => 'fr - description of term 2 of vocabulary 2',
   'weight' => '3',
-  'language' => '',
+  'language' => 'fr',
   'trid' => '0',
 ))
 ->values(array(
   'tid' => '3',
   'vid' => '2',
-  'name' => 'term 3 of vocabulary 2',
-  'description' => 'description of term 3 of vocabulary 2',
+  'name' => 'fr - term 3 of vocabulary 2',
+  'description' => 'fr - description of term 3 of vocabulary 2',
   'weight' => '4',
-  'language' => '',
+  'language' => 'fr',
   'trid' => '0',
 ))
 ->values(array(
@@ -46017,6 +46017,15 @@ $connection->insert('term_data')
   'language' => '',
   'trid' => '0',
 ))
+->values(array(
+  'tid' => '7',
+  'vid' => '1',
+  'name' => 'fr - term 2 of vocabulary 1',
+  'description' => 'fr - desc of term 2 vocab 1',
+  'weight' => '0',
+  'language' => 'fr',
+  'trid' => '0',
+))
 ->execute();
 
 $connection->schema()->createTable('term_hierarchy', array(
@@ -46060,6 +46069,10 @@ $connection->insert('term_hierarchy')
   'tid' => '4',
   'parent' => '0',
 ))
+->values(array(
+  'tid' => '7',
+  'parent' => '0',
+))
 ->values(array(
   'tid' => '3',
   'parent' => '2',
@@ -46120,6 +46133,11 @@ $connection->insert('term_node')
   'vid' => '1',
   'tid' => '1',
 ))
+->values(array(
+  'nid' => '1',
+  'vid' => '1',
+  'tid' => '2',
+))
 ->values(array(
   'nid' => '2',
   'vid' => '3',
@@ -47632,6 +47650,10 @@ $connection->insert('variable')
   'name' => 'i18nstrings_allowed_formats',
   'value' => 'a:2:{i:0;i:1;i:1;i:2;}',
 ))
+->values(array(
+  'name' => 'i18ntaxonomy_vocabulary',
+  'value' => 'a:2:{i:1;s:1:"3";i:2;s:1:"2";}',
+))
 ->values(array(
   'name' => 'i18n_lock_node_article',
   'value' => 'i:1;',
@@ -48160,7 +48182,7 @@ $connection->insert('vocabulary')
   'tags' => '1',
   'module' => 'taxonomy',
   'weight' => '5',
-  'language' => '',
+  'language' => 'fr',
 ))
 ->values(array(
   'vid' => '3',
index 78fb095e2a8603e67d9a6de4d80a47bdbefc1e35..711d2add65290c1e9e15264eab7c1b001f63ba46 100644 (file)
@@ -3426,6 +3426,21 @@ $connection->insert('field_config')
   'translatable' => '0',
   'deleted' => '0',
 ))
+->values(array(
+  'id' => '25',
+  'field_name' => 'field_private_file',
+  'type' => 'file',
+  'module' => 'file',
+  'active' => '1',
+  'storage_type' => 'field_sql_storage',
+  'storage_module' => 'field_sql_storage',
+  'storage_active' => '1',
+  'locked' => '0',
+  'data' => 'a:7:{s:12:"translatable";s:1:"0";s:12:"entity_types";a:0:{}s:8:"settings";a:3:{s:13:"display_field";i:0;s:15:"display_default";i:0;s:10:"uri_scheme";s:7:"private";}s:7:"storage";a:5:{s:4:"type";s:17:"field_sql_storage";s:8:"settings";a:0:{}s:6:"module";s:17:"field_sql_storage";s:6:"active";s:1:"1";s:7:"details";a:1:{s:3:"sql";a:2:{s:18:"FIELD_LOAD_CURRENT";a:1:{s:29:"field_data_field_private_file";a:3:{s:3:"fid";s:22:"field_private_file_fid";s:7:"display";s:26:"field_private_file_display";s:11:"description";s:30:"field_private_file_description";}}s:19:"FIELD_LOAD_REVISION";a:1:{s:33:"field_revision_field_private_file";a:3:{s:3:"fid";s:22:"field_private_file_fid";s:7:"display";s:26:"field_private_file_display";s:11:"description";s:30:"field_private_file_description";}}}}}s:12:"foreign keys";a:1:{s:3:"fid";a:2:{s:5:"table";s:12:"file_managed";s:7:"columns";a:1:{s:3:"fid";s:3:"fid";}}}s:7:"indexes";a:1:{s:3:"fid";a:1:{i:0;s:3:"fid";}}s:2:"id";s:2:"25";}',
+  'cardinality' => '1',
+  'translatable' => '0',
+  'deleted' => '0',
+))
 ->execute();
 
 $connection->schema()->createTable('field_config_instance', array(
@@ -3837,6 +3852,15 @@ $connection->insert('field_config_instance')
   'data' => 'a:7:{s:5:"label";s:14:"Term Reference";s:6:"widget";a:5:{s:6:"weight";s:2:"14";s:4:"type";s:21:"taxonomy_autocomplete";s:6:"module";s:8:"taxonomy";s:6:"active";i:0;s:8:"settings";a:2:{s:4:"size";i:60;s:17:"autocomplete_path";s:21:"taxonomy/autocomplete";}}s:8:"settings";a:1:{s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:4:{s:5:"label";s:5:"above";s:4:"type";s:6:"hidden";s:6:"weight";s:2:"13";s:8:"settings";a:0:{}}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}',
   'deleted' => '0',
 ))
+->values(array(
+  'id' => '42',
+  'field_id' => '25',
+  'field_name' => 'field_private_file',
+  'entity_type' => 'node',
+  'bundle' => 'test_content_type',
+  'data' => 'a:6:{s:5:"label";s:12:"Private file";s:6:"widget";a:5:{s:6:"weight";s:2:"19";s:4:"type";s:12:"file_generic";s:6:"module";s:4:"file";s:6:"active";i:1;s:8:"settings";a:1:{s:18:"progress_indicator";s:8:"throbber";}}s:8:"settings";a:5:{s:14:"file_directory";s:0:"";s:15:"file_extensions";s:3:"txt";s:12:"max_filesize";s:0:"";s:17:"description_field";i:0;s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"file_default";s:8:"settings";a:0:{}s:6:"module";s:4:"file";s:6:"weight";i:18;}}s:8:"required";i:0;s:11:"description";s:0:"";}',
+  'deleted' => '0',
+))
 ->execute();
 
 $connection->schema()->createTable('field_data_body', array(
@@ -5340,13 +5364,136 @@ $connection->insert('field_data_field_phone')
   'bundle' => 'test_content_type',
   'deleted' => '0',
   'entity_id' => '1',
-  'revision_id' => '1',
+  'revision_id' => '6',
   'language' => 'und',
   'delta' => '0',
   'field_phone_value' => '99-99-99-99',
 ))
 ->execute();
 
+$connection->schema()->createTable('field_data_field_private_file', array(
+  'fields' => array(
+    'entity_type' => array(
+      'type' => 'varchar',
+      'not null' => TRUE,
+      'length' => '128',
+      'default' => '',
+    ),
+    'bundle' => array(
+      'type' => 'varchar',
+      'not null' => TRUE,
+      'length' => '128',
+      'default' => '',
+    ),
+    'deleted' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'size' => 'tiny',
+      'default' => '0',
+    ),
+    'entity_id' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'size' => 'normal',
+      'unsigned' => TRUE,
+    ),
+    'revision_id' => array(
+      'type' => 'int',
+      'not null' => FALSE,
+      'size' => 'normal',
+      'unsigned' => TRUE,
+    ),
+    'language' => array(
+      'type' => 'varchar',
+      'not null' => TRUE,
+      'length' => '32',
+      'default' => '',
+    ),
+    'delta' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'size' => 'normal',
+      'unsigned' => TRUE,
+    ),
+    'field_private_file_fid' => array(
+      'type' => 'int',
+      'not null' => FALSE,
+      'size' => 'normal',
+      'unsigned' => TRUE,
+    ),
+    'field_private_file_display' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'size' => 'tiny',
+      'default' => '1',
+      'unsigned' => TRUE,
+    ),
+    'field_private_file_description' => array(
+      'type' => 'text',
+      'not null' => FALSE,
+      'size' => 'normal',
+    ),
+  ),
+  'primary key' => array(
+    'entity_type',
+    'entity_id',
+    'deleted',
+    'delta',
+    'language',
+  ),
+  'indexes' => array(
+    'entity_type' => array(
+      'entity_type',
+    ),
+    'bundle' => array(
+      'bundle',
+    ),
+    'deleted' => array(
+      'deleted',
+    ),
+    'entity_id' => array(
+      'entity_id',
+    ),
+    'revision_id' => array(
+      'revision_id',
+    ),
+    'language' => array(
+      'language',
+    ),
+    'field_private_file_fid' => array(
+      'field_private_file_fid',
+    ),
+  ),
+  'mysql_character_set' => 'utf8',
+));
+
+$connection->insert('field_data_field_private_file')
+->fields(array(
+  'entity_type',
+  'bundle',
+  'deleted',
+  'entity_id',
+  'revision_id',
+  'language',
+  'delta',
+  'field_private_file_fid',
+  'field_private_file_display',
+  'field_private_file_description',
+))
+->values(array(
+  'entity_type' => 'node',
+  'bundle' => 'test_content_type',
+  'deleted' => '0',
+  'entity_id' => '1',
+  'revision_id' => '6',
+  'language' => 'und',
+  'delta' => '0',
+  'field_private_file_fid' => '4',
+  'field_private_file_display' => '1',
+  'field_private_file_description' => '',
+))
+->execute();
+
 $connection->schema()->createTable('field_data_field_tags', array(
   'fields' => array(
     'entity_type' => array(
@@ -7579,6 +7726,140 @@ $connection->insert('field_revision_field_phone')
   'delta' => '0',
   'field_phone_value' => '99-99-99-99',
 ))
+->values(array(
+  'entity_type' => 'node',
+  'bundle' => 'test_content_type',
+  'deleted' => '0',
+  'entity_id' => '1',
+  'revision_id' => '6',
+  'language' => 'und',
+  'delta' => '0',
+  'field_phone_value' => '99-99-99-99',
+))
+->execute();
+
+$connection->schema()->createTable('field_revision_field_private_file', array(
+  'fields' => array(
+    'entity_type' => array(
+      'type' => 'varchar',
+      'not null' => TRUE,
+      'length' => '128',
+      'default' => '',
+    ),
+    'bundle' => array(
+      'type' => 'varchar',
+      'not null' => TRUE,
+      'length' => '128',
+      'default' => '',
+    ),
+    'deleted' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'size' => 'tiny',
+      'default' => '0',
+    ),
+    'entity_id' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'size' => 'normal',
+      'unsigned' => TRUE,
+    ),
+    'revision_id' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'size' => 'normal',
+      'unsigned' => TRUE,
+    ),
+    'language' => array(
+      'type' => 'varchar',
+      'not null' => TRUE,
+      'length' => '32',
+      'default' => '',
+    ),
+    'delta' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'size' => 'normal',
+      'unsigned' => TRUE,
+    ),
+    'field_private_file_fid' => array(
+      'type' => 'int',
+      'not null' => FALSE,
+      'size' => 'normal',
+      'unsigned' => TRUE,
+    ),
+    'field_private_file_display' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'size' => 'tiny',
+      'default' => '1',
+      'unsigned' => TRUE,
+    ),
+    'field_private_file_description' => array(
+      'type' => 'text',
+      'not null' => FALSE,
+      'size' => 'normal',
+    ),
+  ),
+  'primary key' => array(
+    'entity_type',
+    'entity_id',
+    'revision_id',
+    'deleted',
+    'delta',
+    'language',
+  ),
+  'indexes' => array(
+    'entity_type' => array(
+      'entity_type',
+    ),
+    'bundle' => array(
+      'bundle',
+    ),
+    'deleted' => array(
+      'deleted',
+    ),
+    'entity_id' => array(
+      'entity_id',
+    ),
+    'revision_id' => array(
+      'revision_id',
+    ),
+    'language' => array(
+      'language',
+    ),
+    'field_private_file_fid' => array(
+      'field_private_file_fid',
+    ),
+  ),
+  'mysql_character_set' => 'utf8',
+));
+
+$connection->insert('field_revision_field_private_file')
+->fields(array(
+  'entity_type',
+  'bundle',
+  'deleted',
+  'entity_id',
+  'revision_id',
+  'language',
+  'delta',
+  'field_private_file_fid',
+  'field_private_file_display',
+  'field_private_file_description',
+))
+->values(array(
+  'entity_type' => 'node',
+  'bundle' => 'test_content_type',
+  'deleted' => '0',
+  'entity_id' => '1',
+  'revision_id' => '6',
+  'language' => 'und',
+  'delta' => '0',
+  'field_private_file_fid' => '4',
+  'field_private_file_display' => '1',
+  'field_private_file_description' => '',
+))
 ->execute();
 
 $connection->schema()->createTable('field_revision_field_tags', array(
@@ -8365,6 +8646,16 @@ $connection->insert('file_managed')
   'status' => '1',
   'timestamp' => '1421727516',
 ))
+->values(array(
+  'fid' => '3',
+  'uid' => '1',
+  'filename' => 'Babylon5.txt',
+  'uri' => 'private://Babylon5.txt',
+  'filemime' => 'text/plain',
+  'filesize' => '4',
+  'status' => '1',
+  'timestamp' => '1486104045',
+))
 ->execute();
 
 $connection->schema()->createTable('file_usage', array(
@@ -8424,14 +8715,14 @@ $connection->insert('file_usage')
   'module' => 'file',
   'type' => 'node',
   'id' => '1',
-  'count' => '2',
+  'count' => '3',
 ))
 ->values(array(
   'fid' => '2',
   'module' => 'file',
   'type' => 'node',
   'id' => '1',
-  'count' => '1',
+  'count' => '2',
 ))
 ->values(array(
   'fid' => '2',
@@ -8440,6 +8731,13 @@ $connection->insert('file_usage')
   'id' => '2',
   'count' => '1',
 ))
+->values(array(
+  'fid' => '3',
+  'module' => 'file',
+  'type' => 'node',
+  'id' => '1',
+  'count' => '1',
+))
 ->execute();
 
 $connection->schema()->createTable('filter', array(
@@ -43862,7 +44160,7 @@ $connection->insert('variable')
 ))
 ->values(array(
   'name' => 'file_private_path',
-  'value' => 's:0:"";',
+  'value' => 's:21:"sites/default/private";',
 ))
 ->values(array(
   'name' => 'file_public_path',
index 8d9fd8f0a10411049948e31b5dbc4a22cefc3ff1..12dc5c1c89229f8c45612420f3b204c3db8a457e 100644 (file)
@@ -104,6 +104,9 @@ class MigrateUpgradeImportBatch {
     // @todo Find a way to avoid this in https://www.drupal.org/node/2804611.
     if ($definition['destination']['plugin'] === 'entity:file') {
       // Make sure we have a single trailing slash.
+      if ($definition['source']['plugin'] === 'd7_file_private') {
+        $configuration['source']['constants']['source_base_path'] = rtrim($config['source_private_file_path'], '/') . '/';
+      }
       $configuration['source']['constants']['source_base_path'] = rtrim($config['source_base_path'], '/') . '/';
     }
 
index 27e0146016ca08db510b21b11bd6c19f9b5d68a2..c87247eb364554043469f4bf409de3d417cd7115 100644 (file)
@@ -250,6 +250,10 @@ class MigrateUpgradeForm extends ConfirmFormBase {
       'source_module' => 'file',
       'destination_module' => 'file',
     ],
+    'd7_file_private' => [
+      'source_module' => 'file',
+      'destination_module' => 'file',
+    ],
     'd6_filter_format' => [
       'source_module' => 'filter',
       'destination_module' => 'filter',
@@ -530,10 +534,18 @@ class MigrateUpgradeForm extends ConfirmFormBase {
       'source_module' => 'taxonomy',
       'destination_module' => 'taxonomy',
     ],
+    'd6_taxonomy_term_translation' => [
+      'source_module' => 'i18n',
+      'destination_module' => 'taxonomy',
+    ],
     'd6_taxonomy_vocabulary' => [
       'source_module' => 'taxonomy',
       'destination_module' => 'taxonomy',
     ],
+    'd6_taxonomy_vocabulary_translation' => [
+      'source_module' => 'i18n',
+      'destination_module' => 'taxonomy',
+    ],
     'd6_term_node' => [
       'source_module' => 'taxonomy',
       'destination_module' => 'taxonomy',
@@ -877,6 +889,15 @@ class MigrateUpgradeForm extends ConfirmFormBase {
 
     $default_options = [];
 
+
+    $form['version'] = [
+      '#type' => 'radios',
+      '#default_value' => 7,
+      '#title' => $this->t('Drupal version of the source site'),
+      '#options' => [6 => $this->t('Drupal 6'), 7 => $this->t('Drupal 7')],
+      '#required' => TRUE,
+    ];
+
     $form['database'] = [
       '#type' => 'details',
       '#title' => $this->t('Source database'),
@@ -930,10 +951,38 @@ class MigrateUpgradeForm extends ConfirmFormBase {
       '#title' => $this->t('Source files'),
       '#open' => TRUE,
     ];
-    $form['source']['source_base_path'] = [
+    $form['source']['d6_source_base_path'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Files directory'),
       '#description' => $this->t('To import files from your current Drupal site, enter a local file directory containing your site (e.g. /var/www/docroot), or your site address (for example http://example.com).'),
+      '#states' => [
+        'visible' => [
+          ':input[name="version"]' => ['value' => 6],
+        ],
+      ],
+    ];
+
+    $form['source']['source_base_path'] = [
+      '#type' => 'textfield',
+      '#title' => $this->t('Public files directory'),
+      '#description' => $this->t('To import public files from your current Drupal site, enter a local file directory containing your site (e.g. /var/www/docroot), or your site address (for example http://example.com).'),
+      '#states' => [
+        'visible' => [
+          ':input[name="version"]' => ['value' => 7],
+        ],
+      ],
+    ];
+
+    $form['source']['source_private_file_path'] = [
+      '#type' => 'textfield',
+      '#title' => $this->t('Private file directory'),
+      '#default_value' => '',
+      '#description' => $this->t('To import private files from your current Drupal site, enter a local file directory containing your site (e.g. /var/www/docroot).'),
+      '#states' => [
+        'visible' => [
+          ':input[name="version"]' => ['value' => 7],
+        ],
+      ],
     ];
 
     $form['actions'] = ['#type' => 'actions'];
@@ -984,6 +1033,12 @@ class MigrateUpgradeForm extends ConfirmFormBase {
       if (!$version) {
         $form_state->setErrorByName($database['driver'] . '][0', $this->t('Source database does not contain a recognizable Drupal version.'));
       }
+      elseif ($version != $form_state->getValue('version')) {
+        $form_state->setErrorByName($database['driver'] . '][0', $this->t('Source database is Drupal version @version but version @selected was selected.', [
+          '@version' => $version,
+          '@selected' => $form_state->getValue('version'),
+        ]));
+      }
       else {
         $this->createDatabaseStateSettings($database, $version);
         $migrations = $this->getMigrations('migrate_drupal_' . $version, $version);
@@ -1001,6 +1056,7 @@ class MigrateUpgradeForm extends ConfirmFormBase {
         // Store the retrieved migration IDs in form storage.
         $form_state->set('migrations', $migration_array);
         $form_state->set('source_base_path', $form_state->getValue('source_base_path'));
+        $form_state->set('source_private_file_path', $form_state->getValue('source_private_file_path'));
 
         // Store the retrived system data in form storage.
         $form_state->set('system_data', $system_data);
index b635f2ab22170923a98d23c99f102e90e8ad9784..4aea3f1d093b5b8ebe3d2582815682befbae465b 100644 (file)
@@ -2,6 +2,8 @@
 
 namespace Drupal\migrate_drupal_ui\Tests;
 
+@trigger_error('\Drupal\migrate_drupal_ui\Tests\MigrateUpgradeTestBase is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Use \Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeTestBase instead.', E_USER_DEPRECATED);
+
 use Drupal\Core\Database\Database;
 use Drupal\migrate\Plugin\MigrateIdMapInterface;
 use Drupal\migrate_drupal\MigrationConfigurationTrait;
@@ -9,6 +11,9 @@ use Drupal\simpletest\WebTestBase;
 
 /**
  * Provides a base class for testing migration upgrades in the UI.
+ *
+ * @deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Use
+ *   \Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeTestBase instead.
  */
 abstract class MigrateUpgradeTestBase extends WebTestBase {
   use MigrationConfigurationTrait;
similarity index 82%
rename from web/core/modules/migrate_drupal_ui/src/Tests/MigrateAccessTest.php
rename to web/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateAccessTest.php
index 04f2048eac66c75b7c6b16d6587a9a3a4412d489..3c475e20688fa7d98efe277ed5291bc9c708b9f8 100644 (file)
@@ -1,15 +1,15 @@
 <?php
 
-namespace Drupal\migrate_drupal_ui\Tests;
+namespace Drupal\Tests\migrate_drupal_ui\Functional;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests that only user 1 can access the migrate UI.
  *
  * @group migrate_drupal_ui
  */
-class MigrateAccessTest extends WebTestBase {
+class MigrateAccessTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
diff --git a/web/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php b/web/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php
new file mode 100644 (file)
index 0000000..9741a0b
--- /dev/null
@@ -0,0 +1,231 @@
+<?php
+
+namespace Drupal\Tests\migrate_drupal_ui\Functional;
+
+use Drupal\Core\Database\Database;
+use Drupal\migrate\Plugin\MigrateIdMapInterface;
+use Drupal\migrate_drupal\MigrationConfigurationTrait;
+use Drupal\Tests\BrowserTestBase;
+
+/**
+ * Provides a base class for testing migration upgrades in the UI.
+ */
+abstract class MigrateUpgradeTestBase extends BrowserTestBase {
+  use MigrationConfigurationTrait;
+
+  /**
+   * Use the Standard profile to test help implementations of many core modules.
+   */
+  protected $profile = 'standard';
+
+  /**
+   * The source database connection.
+   *
+   * @var \Drupal\Core\Database\Connection
+   */
+  protected $sourceDatabase;
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = [
+    'language',
+    'content_translation',
+    'migrate_drupal_ui',
+    'telephone',
+    'aggregator',
+    'book',
+    'forum',
+    'statistics',
+  ];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    $this->createMigrationConnection();
+    $this->sourceDatabase = Database::getConnection('default', 'migrate_drupal_ui');
+
+    // Log in as user 1. Migrations in the UI can only be performed as user 1.
+    $this->drupalLogin($this->rootUser);
+  }
+
+  /**
+   * Loads a database fixture into the source database connection.
+   *
+   * @param string $path
+   *   Path to the dump file.
+   */
+  protected function loadFixture($path) {
+    $default_db = Database::getConnection()->getKey();
+    Database::setActiveConnection($this->sourceDatabase->getKey());
+
+    if (substr($path, -3) == '.gz') {
+      $path = 'compress.zlib://' . $path;
+    }
+    require $path;
+
+    Database::setActiveConnection($default_db);
+  }
+
+  /**
+   * Changes the database connection to the prefixed one.
+   *
+   * @todo Remove when we don't use global. https://www.drupal.org/node/2552791
+   */
+  protected function createMigrationConnection() {
+    $connection_info = Database::getConnectionInfo('default')['default'];
+    if ($connection_info['driver'] === 'sqlite') {
+      // Create database file in the test site's public file directory so that
+      // \Drupal\simpletest\TestBase::restoreEnvironment() will delete this once
+      // the test is complete.
+      $file = $this->publicFilesDirectory . '/' . $this->testId . '-migrate.db.sqlite';
+      touch($file);
+      $connection_info['database'] = $file;
+      $connection_info['prefix'] = '';
+    }
+    else {
+      $prefix = is_array($connection_info['prefix']) ? $connection_info['prefix']['default'] : $connection_info['prefix'];
+      // Simpletest uses fixed length prefixes. Create a new prefix for the
+      // source database. Adding to the end of the prefix ensures that
+      // \Drupal\simpletest\TestBase::restoreEnvironment() will remove the
+      // additional tables.
+      $connection_info['prefix'] = $prefix . '0';
+    }
+
+    Database::addConnectionInfo('migrate_drupal_ui', 'default', $connection_info);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function tearDown() {
+    Database::removeConnection('migrate_drupal_ui');
+    parent::tearDown();
+  }
+
+  /**
+   * Executes all steps of migrations upgrade.
+   */
+  public function testMigrateUpgrade() {
+    $connection_options = $this->sourceDatabase->getConnectionOptions();
+    $this->drupalGet('/upgrade');
+    $this->assertText('Upgrade a site by importing it into a clean and empty new install of Drupal 8. You will lose any existing configuration once you import your site into it. See the online documentation for Drupal site upgrades for more detailed information.');
+
+    $this->drupalPostForm(NULL, [], t('Continue'));
+    $this->assertText('Provide credentials for the database of the Drupal site you want to upgrade.');
+    $this->assertFieldByName('mysql[host]');
+
+    $driver = $connection_options['driver'];
+    $connection_options['prefix'] = $connection_options['prefix']['default'];
+
+    // Use the driver connection form to get the correct options out of the
+    // database settings. This supports all of the databases we test against.
+    $drivers = drupal_get_database_types();
+    $form = $drivers[$driver]->getFormOptions($connection_options);
+    $connection_options = array_intersect_key($connection_options, $form + $form['advanced_options']);
+    $version = $this->getLegacyDrupalVersion($this->sourceDatabase);
+    $edit = [
+      $driver => $connection_options,
+      'source_base_path' => $this->getSourceBasePath(),
+      'source_private_file_path' => $this->getSourceBasePath(),
+      'version' => $version,
+    ];
+    if (count($drivers) !== 1) {
+      $edit['driver'] = $driver;
+    }
+    $edits = $this->translatePostValues($edit);
+
+    // Ensure submitting the form with invalid database credentials gives us a
+    // nice warning.
+    $this->drupalPostForm(NULL, [$driver . '[database]' => 'wrong'] + $edits, t('Review upgrade'));
+    $this->assertText('Resolve the issue below to continue the upgrade.');
+
+    $this->drupalPostForm(NULL, $edits, t('Review upgrade'));
+    $this->assertResponse(200);
+    $this->assertText('Are you sure?');
+    $this->drupalPostForm(NULL, [], t('Perform upgrade'));
+    $this->assertText(t('Congratulations, you upgraded Drupal!'));
+
+    // Have to reset all the statics after migration to ensure entities are
+    // loadable.
+    $this->resetAll();
+
+    $expected_counts = $this->getEntityCounts();
+    foreach (array_keys(\Drupal::entityTypeManager()
+      ->getDefinitions()) as $entity_type) {
+      $real_count = \Drupal::entityQuery($entity_type)->count()->execute();
+      $expected_count = isset($expected_counts[$entity_type]) ? $expected_counts[$entity_type] : 0;
+      $this->assertEqual($expected_count, $real_count, "Found $real_count $entity_type entities, expected $expected_count.");
+    }
+
+    $plugin_manager = \Drupal::service('plugin.manager.migration');
+    /** @var \Drupal\migrate\Plugin\Migration[] $all_migrations */
+    $all_migrations = $plugin_manager->createInstancesByTag('Drupal ' . $version);
+    foreach ($all_migrations as $migration) {
+      $id_map = $migration->getIdMap();
+      foreach ($id_map as $source_id => $map) {
+        // Convert $source_id into a keyless array so that
+        // \Drupal\migrate\Plugin\migrate\id_map\Sql::getSourceHash() works as
+        // expected.
+        $source_id_values = array_values(unserialize($source_id));
+        $row = $id_map->getRowBySource($source_id_values);
+        $destination = serialize($id_map->currentDestination());
+        $message = "Migration of $source_id to $destination as part of the {$migration->id()} migration. The source row status is " . $row['source_row_status'];
+        // A completed migration should have maps with
+        // MigrateIdMapInterface::STATUS_IGNORED or
+        // MigrateIdMapInterface::STATUS_IMPORTED.
+        if ($row['source_row_status'] == MigrateIdMapInterface::STATUS_FAILED || $row['source_row_status'] == MigrateIdMapInterface::STATUS_NEEDS_UPDATE) {
+          $this->fail($message);
+        }
+        else {
+          $this->pass($message);
+        }
+      }
+    }
+    \Drupal::service('module_installer')->install(['forum']);
+    \Drupal::service('module_installer')->install(['book']);
+  }
+
+  /**
+   * Transforms a nested array into a flat array suitable for BrowserTestBase::drupalPostForm().
+   *
+   * @param array $values
+   *   A multi-dimensional form values array to convert.
+   *
+   * @return array
+   *   The flattened $edit array suitable for BrowserTestBase::drupalPostForm().
+   */
+  protected function translatePostValues(array $values) {
+    $edit = [];
+    // The easiest and most straightforward way to translate values suitable for
+    // BrowserTestBase::drupalPostForm() is to actually build the POST data string
+    // and convert the resulting key/value pairs back into a flat array.
+    $query = http_build_query($values);
+    foreach (explode('&', $query) as $item) {
+      list($key, $value) = explode('=', $item);
+      $edit[urldecode($key)] = urldecode($value);
+    }
+    return $edit;
+  }
+
+  /**
+   * Gets the source base path for the concrete test.
+   *
+   * @return string
+   *   The source base path.
+   */
+  abstract protected function getSourceBasePath();
+
+  /**
+   * Gets the expected number of entities per entity type after migration.
+   *
+   * @return int[]
+   *   An array of expected counts keyed by entity type ID.
+   */
+  abstract protected function getEntityCounts();
+
+}
similarity index 90%
rename from web/core/modules/migrate_drupal_ui/src/Tests/d6/MigrateUpgrade6Test.php
rename to web/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php
index 48d3d8d99e39dbbbc4f47d297555adcf317b84b9..0578675c054b0514bc168598092759b609fd0c96 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-namespace Drupal\migrate_drupal_ui\Tests\d6;
+namespace Drupal\Tests\migrate_drupal_ui\Functional\d6;
 
-use Drupal\migrate_drupal_ui\Tests\MigrateUpgradeTestBase;
+use Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeTestBase;
 use Drupal\user\Entity\User;
 
 /**
@@ -59,7 +59,7 @@ class MigrateUpgrade6Test extends MigrateUpgradeTestBase {
       'shortcut_set' => 1,
       'action' => 22,
       'menu' => 8,
-      'taxonomy_term' => 6,
+      'taxonomy_term' => 7,
       'taxonomy_vocabulary' => 6,
       'tour' => 4,
       'user' => 7,
@@ -83,7 +83,7 @@ class MigrateUpgrade6Test extends MigrateUpgradeTestBase {
 
     // Ensure migrated users can log in.
     $user = User::load(2);
-    $user->pass_raw = 'john.doe_pass';
+    $user->passRaw = 'john.doe_pass';
     $this->drupalLogin($user);
   }
 
similarity index 86%
rename from web/core/modules/migrate_drupal_ui/src/Tests/d7/MigrateUpgrade7Test.php
rename to web/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7Test.php
index 94a42e2c956463cfd8e65b767565099809be4323..2917b163c13dd7750e541e6ea4837c7483b84950 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-namespace Drupal\migrate_drupal_ui\Tests\d7;
+namespace Drupal\Tests\migrate_drupal_ui\Functional\d7;
 
-use Drupal\migrate_drupal_ui\Tests\MigrateUpgradeTestBase;
+use Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeTestBase;
 use Drupal\user\Entity\User;
 
 /**
@@ -14,6 +14,11 @@ use Drupal\user\Entity\User;
  */
 class MigrateUpgrade7Test extends MigrateUpgradeTestBase {
 
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['file'];
+
   /**
    * {@inheritdoc}
    */
@@ -45,9 +50,9 @@ class MigrateUpgrade7Test extends MigrateUpgradeTestBase {
       'configurable_language' => 4,
       'contact_form' => 3,
       'editor' => 2,
-      'field_config' => 52,
-      'field_storage_config' => 39,
-      'file' => 2,
+      'field_config' => 53,
+      'field_storage_config' => 40,
+      'file' => 3,
       'filter_format' => 7,
       'image_style' => 6,
       'language_content_settings' => 2,
@@ -84,7 +89,7 @@ class MigrateUpgrade7Test extends MigrateUpgradeTestBase {
 
     // Ensure migrated users can log in.
     $user = User::load(2);
-    $user->pass_raw = 'a password';
+    $user->passRaw = 'a password';
     $this->drupalLogin($user);
   }
 
diff --git a/web/core/modules/migrate_drupal_ui/tests/src/Functional/d7/files/sites/default/private/Babylon5.txt b/web/core/modules/migrate_drupal_ui/tests/src/Functional/d7/files/sites/default/private/Babylon5.txt
new file mode 100644 (file)
index 0000000..6a7e452
--- /dev/null
@@ -0,0 +1 @@
+***
index b480f899d95b1de35e5241559342726fd599eea9..ce4ce76e968f29b0ecfbbe1c5e33b54ae55764f1 100644 (file)
@@ -95,6 +95,10 @@ class MigrateNodeTest extends MigrateNodeTestBase {
     $this->assertSame('Klingon Empire', $node->field_company[0]->entity->label());
     $this->assertSame('Romulan Empire', $node->field_company[1]->entity->label());
 
+    // Test that user reference field values were migrated.
+    $this->assertCount(1, $node->field_commander);
+    $this->assertSame('joe.roe', $node->field_commander[0]->entity->getUsername());
+
     $node = Node::load(2);
     $this->assertIdentical('Test title rev 3', $node->getTitle());
     $this->assertIdentical('test rev 3', $node->body->value);
index 3c86aca36397648d2a1ff48b5cba2f5d825e034d..64a2ca2ff99690888333d4484feeaed5a082474a 100644 (file)
   -moz-transition: all .7s ease;
   transition: all .7s ease;
 }
-
-/* Transition the position of the toolbar. */
-.toolbar-fixed,
-.toolbar-tray-open {
-  -webkit-transition: all .5s ease;
-  -moz-transition: all .5s ease;
-  transition: all .5s ease;
-}
-
-/* Transition the administration tray.
-#toolbar-administration,
-#toolbar-administration * {
-  -webkit-transition: all .7s ease;
-  -moz-transition: all .7s ease;
-  transition: all .7s ease;
-}*/
index 011d198daed209e0d449c54ad3222934f04c98e5..235631397392cad6964101976e5ac22a986365d1 100644 (file)
@@ -9,7 +9,7 @@
 
 /* Style the edit mode toolbar and tabs. */
 #toolbar-bar.js-outside-in-edit-mode {
-  background-color: #fff;
+  background-image: linear-gradient(to bottom,#0c97ed,#1f86c7);
 }
 .js-outside-in-edit-mode .toolbar-item:not(.toolbar-icon-edit) {
   color: #999;
index 9989d91f652745abb9cd4f84d3776d82c0feadb0..2371483ed531b847c9dbcd087c96f75dc12a190a 100644 (file)
@@ -11,6 +11,11 @@ use Drupal\Core\Ajax\OpenDialogCommand;
  */
 class OpenOffCanvasDialogCommand extends OpenDialogCommand {
 
+  /**
+   * The dialog width to use if none is provided.
+   */
+  const DEFAULT_DIALOG_WIDTH = 300;
+
   /**
    * Constructs an OpenOffCanvasDialogCommand object.
    *
@@ -42,6 +47,12 @@ class OpenOffCanvasDialogCommand extends OpenDialogCommand {
     // @todo drupal.ajax.js does not respect drupalAutoButtons properly, pass an
     //   empty set of buttons until https://www.drupal.org/node/2793343 is in.
     $this->dialogOptions['buttons'] = [];
+    // If no width option is provided then use the default width to avoid the
+    // dialog staying at the width of the previous instance when opened
+    // more than once, with different widths, on a single page.
+    if (!isset($this->dialogOptions['width'])) {
+      $this->dialogOptions['width'] = static::DEFAULT_DIALOG_WIDTH;
+    }
   }
 
   /**
index 4e0f081fb5c840a14560cbcac263131b79f2e19d..f97f79ae05e51fb89129a283b5758de7281cb8e7 100644 (file)
@@ -44,7 +44,7 @@ class BlockEntityOffCanvasForm extends BlockForm {
     }
     $form['advanced_link'] = [
       '#type' => 'link',
-      '#title' => $this->t('Advanced options'),
+      '#title' => $this->t('Advanced block options'),
       '#url' => $this->entity->toUrl('edit-form', ['query' => $query]),