Problem/Motivation

After #2870009: Update: Convert system functional tests to phpunit is in we can now convert a lot of remaining tests in various modules:

TestBase (core/modules/simpletest/src/TestBase.php)
    WebTestBase (core/modules/simpletest/src/WebTestBase.php)
        UpdatePathTestBase (core/modules/system/src/Tests/Update/UpdatePathTestBase.php)
            FieldUpdateTest (core/modules/field/src/Tests/Update/FieldUpdateTest.php)
            MenuLinkUpdatePathTest (modules/menu_link/src/Tests/MenuLinkUpdatePathTest.php)
            BlockContextMappingUpdateTest (core/modules/block/src/Tests/Update/BlockContextMappingUpdateTest.php)
                BlockContextMappingUpdateFilledTest (core/modules/block/src/Tests/Update/BlockContextMappingUpdateFilledTest.php)
                                DblogFiltersAndFieldsUpgradeTest (core/modules/dblog/src/Tests/Update/DblogFiltersAndFieldsUpgradeTest.php)
            SqlContentEntityStorageSchemaConverterTest (core/modules/system/src/Tests/Entity/Update/SqlContentEntityStorageSchemaConverterTest.php)
            ResponsiveImageUpdateTest (core/modules/responsive_image/src/Tests/Update/ResponsiveImageUpdateTest.php)
            ContentTranslationUpdateTest (core/modules/content_translation/src/Tests/Update/ContentTranslationUpdateTest.php)
            NodeUpdateTest (core/modules/node/src/Tests/Update/NodeUpdateTest.php)
            RestConfigurationEntitiesUpdateTest (core/modules/rest/src/Tests/Update/RestConfigurationEntitiesUpdateTest.php)
            UserUpdateOrderPermissionsTest (core/modules/user/src/Tests/Update/UserUpdateOrderPermissionsTest.php)
            EntityViewsDataUpdateTest (core/modules/views/src/Tests/Update/EntityViewsDataUpdateTest.php)
                EntityViewsDataUpdateFilledTest (core/modules/views/src/Tests/Update/EntityViewsDataUpdateFilledTest.php)
                                ImageStyleDependencyUpdateTest (core/modules/views/src/Tests/Update/ImageStyleDependencyUpdateTest.php)
            ArgumentPlaceholderUpdatePathTest (core/modules/views/src/Tests/Update/ArgumentPlaceholderUpdatePathTest.php)
            FieldHandlersUpdateTest (core/modules/views/src/Tests/Update/FieldHandlersUpdateTest.php)
            CacheabilityMetadataUpdateTest (core/modules/views/src/Tests/Update/CacheabilityMetadataUpdateTest.php)
            BooleanFilterValuesUpdateTest (core/modules/views/src/Tests/Update/BooleanFilterValuesUpdateTest.php)
            MoveRevisionMetadataFieldsUpdateTest (core/modules/system/src/Tests/Entity/Update/MoveRevisionMetadataFieldsUpdateTest.php)
            LangcodeToAsciiUpdateTest (core/modules/system/src/Tests/Entity/Update/LangcodeToAsciiUpdateTest.php)
                LangcodeToAsciiUpdateFilledTest (core/modules/system/src/Tests/Entity/Update/LangcodeToAsciiUpdateFilledTest.php)
                                EntityUpdateToRevisionableAndPublishableTest (core/modules/system/src/Tests/Update/EntityUpdateToRevisionableAndPublishableTest.php)
            LanguageSelectWidgetUpdateTest (core/modules/language/src/Tests/Update/LanguageSelectWidgetUpdateTest.php)
            BlockContentUpdateTest (core/modules/block_content/src/Tests/BlockContentUpdateTest.php)
            MigrateLinkDomainSettingFromRestToHalUpdateTest (core/modules/hal/tests/src/Functional/Update/MigrateLinkDomainSettingFromRestToHalUpdateTest.php)
            CreateHalSettingsForLinkDomainUpdateTest (core/modules/hal/tests/src/Functional/Update/CreateHalSettingsForLinkDomainUpdateTest.php)
            FileUsageTemporaryDeletionConfigurationUpdateTest (core/modules/file/src/Tests/Update/FileUsageTemporaryDeletionConfigurationUpdateTest.php)
            ResourceGranularityUpdateTest (core/modules/rest/src/Tests/Update/ResourceGranularityUpdateTest.php)
            EntityResourcePermissionsUpdateTest (core/modules/rest/src/Tests/Update/EntityResourcePermissionsUpdateTest.php)
            RestExportAuthUpdateTest (core/modules/rest/src/Tests/Update/RestExportAuthUpdateTest.php)
            UserUpdateEmailToken (core/modules/user/src/Tests/Update/UserUpdateEmailToken.php)
            BlockConditionMissingSchemaUpdateTest (core/modules/block/src/Tests/Update/BlockConditionMissingSchemaUpdateTest.php)
            BlockRemoveDisabledRegionUpdateTest (core/modules/block/src/Tests/Update/BlockRemoveDisabledRegionUpdateTest.php)
            DblogRecentLogsUsingViewsUpdateTest (core/modules/dblog/src/Tests/Update/DblogRecentLogsUsingViewsUpdateTest.php)
            EmailWidgetSizeSettingUpdateTest (core/modules/field/src/Tests/Update/EmailWidgetSizeSettingUpdateTest.php)
            EntityReferenceHandlerSettingUpdateTest (core/modules/field/src/Tests/Update/EntityReferenceHandlerSettingUpdateTest.php)
            ImageUpdateTest (core/modules/image/src/Tests/Update/ImageUpdateTest.php)
            EditorUpdateTest (core/modules/editor/src/Tests/Update/EditorUpdateTest.php)
            SyslogUpdateTest (core/modules/syslog/src/Tests/Update/SyslogUpdateTest.php)
            SqlContentEntityStorageSchemaIndexTest (core/modules/system/src/Tests/Entity/Update/SqlContentEntityStorageSchemaIndexTest.php)
                SqlContentEntityStorageSchemaIndexFilledTest (core/modules/system/src/Tests/Entity/Update/SqlContentEntityStorageSchemaIndexFilledTest.php)
                                EntityUpdateAddRevisionTranslationAffectedTest (core/modules/system/src/Tests/Update/EntityUpdateAddRevisionTranslationAffectedTest.php)
            CommentAdminViewUpdateTest (core/modules/comment/src/Tests/Update/CommentAdminViewUpdateTest.php)
            CommentUpdateTest (core/modules/comment/src/Tests/Update/CommentUpdateTest.php)
            ContactUpdateTest (core/modules/contact/src/Tests/Update/ContactUpdateTest.php)
            AggregatorUpdateTest (core/modules/aggregator/src/Tests/Update/AggregatorUpdateTest.php)
            EntityEmbedUpdateHookTest (modules/entity_embed/src/Tests/EntityEmbedUpdateHookTest.php)
            EntityBrowserUpdateHookTest (modules/entity_browser/src/Tests/EntityBrowserUpdateHookTest.php)
            Update8001Test (modules/field_collection/src/Tests/Update/Update8001Test.php)

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

dawehner created an issue. See original summary.

dawehner’s picture

Issue summary: View changes
Lendude’s picture

MenuLinkUpdatePathTest (modules/menu_link/src/Tests/MenuLinkUpdatePathTest.php)
EntityEmbedUpdateHookTest (modules/entity_embed/src/Tests/EntityEmbedUpdateHookTest.php)
EntityBrowserUpdateHookTest (modules/entity_browser/src/Tests/EntityBrowserUpdateHookTest.php)
Update8001Test (modules/field_collection/src/Tests/Update/Update8001Test.php)

Pretty sure we don't need to convert these as part of core :)

Should we just do all the update tests in one issue, cross module? So far the conversions were extremely straight forward once we got everything up and running in BrowserTestBase, so I wouldn't expect it to be completely unreviewable. So I'd be +1 for that.

dawehner’s picture

Pretty sure we don't need to convert these as part of core :)

Fair, well ... I just used the class hierarchy in phpstorm :)

I agree with the idea of @Lendude, all those update path tests are basically one thing are will probably not contain any special bit. Its one review scope :)

Lendude’s picture

Status: Active » Needs review
FileSize
59.41 KB

This converts everything that extended \Drupal\system\Tests\Update\UpdatePathTestBase, lets see what this does.

Status: Needs review » Needs work

The last submitted patch, 5: 2905627-5.patch, failed testing. View results

Lendude’s picture

Status: Needs work » Needs review
FileSize
2.85 KB
61.24 KB

tweaks.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community
+++ b/core/modules/system/tests/src/Functional/Update/EntityUpdateAddRevisionTranslationAffectedTest.php
@@ -53,14 +54,14 @@ protected function setUp() {
    * Tests the addition of the 'revision_translation_affected' base field.
    *
-   * @covers system_update_8402
+   * @see system_update_8402()
    */

Ha, nice catch phpunit!

catch’s picture

Version: 8.5.x-dev » 8.4.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.5.x and cherry-picked to 8.4.x. Thanks!

  • catch committed 9ef92a4 on 8.5.x
    Issue #2905627 by Lendude, dawehner: Part-2: Convert UpdatePathTestBase...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.