Problem/Motivation

As part of #3339788: Fix the issues reported by phpcs it was discovered that test coverage is missing for the Settings form causing the form to fail with WSOD after the site is upgraded to D11. The root cause for this was a new dependency being added to ConfigFormBase class. Due to a lack of test coverage the problem was not uncovered by Gitlab CI

Proposed resolution

Add test coverage to check if the form loads, and can be submitted successfully.

CommentFileSizeAuthor
#3 3493095-test-and-form-fix.patch9.59 KBchris dart
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

zaporylie created an issue. See original summary.

lexfunk made their first commit to this issue’s fork.

chris dart’s picture

StatusFileSize
new9.59 KB

I am currently having trouble pushing the code to git.drupalcode.org. But here's what I did:

  • Moved the form to a /Forms directory and updated the class and route
  • Fixed the error with the use of PhoneNumberFormat.php, the correct format is to use ->value when dealing with an ENUM constant.
  • Created a test class to handle a variety of tasks associated with the form

  • zaporylie committed 8da86602 on 8.x-2.x
    task: #3493095 The settings form is missing test coverage
    
    By: zaporylie...
zaporylie’s picture

Status: Active » Fixed

As per issue summary - decided to only go with a test, leaving all the refactoring out of this issue. Thanks for help.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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