Closed (fixed)
Project:
Simplenews
Version:
3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
7 Oct 2020 at 17:43 UTC
Updated:
28 May 2021 at 16:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
paulocsA patch for it.
Comment #4
Pooja Ganjage commentedHi,
I am creating patch for failing #2 comment patch.
Please review the patch.
Thanks.
Comment #5
Pooja Ganjage commentedComment #7
paulocsHey @Pooja Ganjage,
can you provide the interdiff?
Comment #8
paulocsSimplenewsSubscribeTest.php is falling even if no patch is applied.
Comment #9
Pooja Ganjage commentedComment #10
Pooja Ganjage commentedComment #12
Pooja Ganjage commentedComment #13
Pooja Ganjage commentedComment #14
Pooja Ganjage commentedComment #15
Pooja Ganjage commentedComment #16
Pooja Ganjage commentedComment #17
Pooja Ganjage commentedComment #18
adamps commentedTests are failing so this is still "needs work"
Comment #19
paulocsComment #20
paulocsComment #21
tr commentedRerolled patch, which should now apply to HEAD, but without the unrelated coding standards fixes (e.g. changes to README.txt) that are in #17. This just changes the drupalPostForm() calls according to the change record drupalPostForm() in functional tests is deprecated
Comment #23
tr commentedTest failure seems to be because the patch changed the regular expression in tests/src/Functional/SimplenewsSourceTest.php - I don't know why that was done, but it's clearly outside the scope of this issue. So here's a re-roll with that restored:
Comment #24
adamps commentedLooks good from a quick glance thanks. I will review more carefully and commit soon.
Comment #25
tr commentedHere's a re-roll of #23 to update the patch to remove offsets - other commits since November have altered the line numbers.
Comment #26
adamps commentedThanks @TR sorry I lost track of this one. I notice that you remove a lot of calls to t(). Presumably this is covered by some Drupal coding standard - please can you post a link?
Comment #27
paulocsHello @AdamPS!
Here you can read about it: https://www.drupal.org/docs/automated-testing/phpunit-in-drupal/phpunit-browser-test-tutorial#t
Comment #28
tr commented@AdamPS: That is a really, really old "change" to Drupal - see #500866: [META] remove t() from assert message from 2009.
It has taken forever to try eliminate the legacy use of
t()in tests in core ... still not finished after all these years because this keeps getting re-introduced ...The primary purpose of the patch here is not to fix the
t()issue, but becauset()is used improperly in everydrupalPostForm()call in this module my position is that as long as the patch is replacing thedrupalPostForm()calls we should ensure we don't make the same mistake of usingt()in the new code. I didn't try to fix thet()issue anywhere else in the module tests.Comment #30
adamps commentedThanks that's perfectly clear