- Issue created by @lrwebks
- Status changed to Needs review
about 1 year ago 10:46am 22 November 2023 - Status changed to Needs work
about 1 year ago 10:52am 22 November 2023 - 🇩🇪Germany Anybody Porta Westfalica
Well done! I left the required comments. For examples of such update hooks, see our other projects. I think photoswipe has such.
- Status changed to Needs review
about 1 year ago 11:18am 22 November 2023 - Status changed to Needs work
about 1 year ago 11:45am 22 November 2023 - 🇩🇪Germany Anybody Porta Westfalica
Just one comment left. Now it needs three tests:
- No email address
- Single email address
- Multiple email addresses (one with space perhaps)?We could also add a test for edge-cases, like a trailing or preceding comma or a wrongly formattet email address. That's something we would then need to check in hook_validate in the settings form, so it will not be stored and expects a form error.
I think that makes sense. Sth. like this:
$email = $form_state->getValue('email_field'); if (!\Drupal::service('email.validator')->isValid($email)) { $form_state->setErrorByName('email_field', t('Please enter a valid email address.')); }
(The service should probably be injected by dependency injection into the form class)
- 🇩🇪Germany Anybody Porta Westfalica
For further tests I added some ressources / links:
📌 Add basic test coverage Needs work - 🇩🇪Germany Anybody Porta Westfalica
✨ Add multiple emails for email report. Active look like a duplicate?
We should combine both for the best solution. @LRWebks why didn't you mention this? You linked the issue :D
- 🇩🇪Germany lrwebks Porta Westfalica
Currently, I am unsure of how to test this, as generating a PHP error manually to receive the email causes PHPUnit to stop the test... Should we "Postpone" / "Needs Review" and outsource the test to 📌 Add basic test coverage Needs work / keep this issue as is?
- 🇩🇪Germany Anybody Porta Westfalica
Yes, please make it part of the other issue. Indeed we need to take a closer look how to test this. I think there will be ways...
- Status changed to Needs review
12 months ago 12:51pm 29 November 2023 - Status changed to Needs work
12 months ago 12:56pm 29 November 2023 - 🇩🇪Germany Anybody Porta Westfalica
@LRWebks: Looking pretty good, well done!! :)
I left some comments. Regarding the tests: If they don't work, better move that code into the other issue.
It's fine if the tests there fail for now, but they should never exepect a wrong issue. - Status changed to Needs review
12 months ago 1:28pm 29 November 2023 - Open on Drupal.org →Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7last update
12 months ago Waiting for branch to pass - 🇩🇪Germany Anybody Porta Westfalica
LGTM. Did you test this manually good enough? Also the update hook for existing installations?
- Open on Drupal.org →Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7last update
12 months ago Waiting for branch to pass - Open on Drupal.org →Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7last update
12 months ago Waiting for branch to pass - Issue was unassigned.
- Status changed to RTBC
12 months ago 10:48am 1 December 2023 - Open on Drupal.org →Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7last update
12 months ago Waiting for branch to pass - Open on Drupal.org →Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7last update
12 months ago Waiting for branch to pass - Open on Drupal.org →Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7last update
12 months ago Waiting for branch to pass - Status changed to Fixed
12 months ago 11:02am 1 December 2023 - Status changed to Needs work
12 months ago 9:04pm 5 December 2023 - 🇩🇪Germany Anybody Porta Westfalica
@nevergone: Just FYI: Typically Fixed / merged tasks should not be reopened, instead a follow-up should be created. In this case I'd just suggest to track all the tests we need in the testing issue.
But of course you decide!
-
nevergone →
committed ab81f50b on 2.0.x
Issue #3402430 by nevergone: Followup: add tests.
-
nevergone →
committed ab81f50b on 2.0.x
- Status changed to Fixed
12 months ago 7:50am 6 December 2023 -
nevergone →
committed ab81f50b on 3332921-add-more-configuration--squash-merge
Issue #3402430 by nevergone: Followup: add tests.
-
nevergone →
committed ab81f50b on 3332921-add-more-configuration--squash-merge
Automatically closed - issue fixed for 2 weeks with no activity.