Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Similar to #2930442: Base test classess should extend BrowserTestBase
PHPUnit initiative is moving away from WebTestBase and towards Functional tests based on BrowserTestBase, then deprecating the old base classes, we should probably follow their lead, although I dont think we have to keep the old ones since we are in alpha stil.
Comment | File | Size | Author |
---|---|---|---|
#18 | ga_login-phpunit.png | 46.92 KB | daggerhart |
#15 | 2938091-12-15-interdiff.txt | 657 bytes | daggerhart |
#15 | 2938091-15.patch | 42.36 KB | daggerhart |
|
Comments
Comment #2
daggerhart CreditAttribution: daggerhart commentedVery much a work in progress patch. I ran into trouble around the config schema again and ran out of time.
Comment #3
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedThis should fix the schema errors @daggerhart: #2948999: Incorrect schema definition
Comment #4
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedTriggering test bot
Comment #6
daggerhart CreditAttribution: daggerhart commentedThanks @manuel-garcia, that fixes my problem!
I'm going to assign this issue to me because I have a bit of work into it and want to complete my first pass. Should have something to show by eod.
Comment #7
daggerhart CreditAttribution: daggerhart commentedHere are 4 working tests classes. I've removed the old test classes as well.
There were some minor changes I had to make to the setup and validation plugins in order to get these tests working how I wanted. Mainly changing some protected properties/methods to public.
I have not included a test for Recovery Codes, because they are technically a TFA validation plugin.
Feedback welcome. Unassigning myself incase someone else wants to take a crack at this.
Comment #9
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedLet's see if this gets the tests running on drupal.org
Comment #11
daggerhart CreditAttribution: daggerhart commentedMoving this to alpha5, when tfa will have a release that contains the new TfaTestBase class.
Comment #12
daggerhart CreditAttribution: daggerhart commentedSince we figured out the issue with d.o testing, I like the idea of removing the test_dependencies: from info file. We are currently misusing
test_dependencies
in the module.Here is a re-roll of #7 with the info file changed to match @manuel-garcia's #9. I re-rolled against #7 because for some reason #9 failed to apply because of composer.json changes that have happened in the 8.x-1.x branch.
The only remaining question I have is: do we need to add drupal/tfa as a requirement in composer.json as Manuel did in #9? I honestly don't know, so any feedback would be appreciated.
Comment #13
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedI'd say having a composer dependency on
tfa
makes sense because:tfa
enabled.drupal/ga_login
and conviently get all its dependencies.Comment #14
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedI would also have a dependency on tfa on the info file for the same reasons.
Comment #15
daggerhart CreditAttribution: daggerhart commentedThanks Manuel, that all makes good sense to me.
Here is a re-roll that adds tfa as a composer dependency, and re-adds the tfa-sepcific module version into the info file.
Since old versions of tfa will not work with new versions of ga_login, I think it's best that we bear the burden of ensuring that users have the right versions of the modules that work together. This means we'll have to continue to bump the required tfa version in the info file for each alpha release, but I think it's worthwhile to save module users from the frustration of figuring it out on their own.
Comment #16
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedMakes sense to me @daggerhart - I've got no more things to complain about so RTBCing :)
Comment #17
nerdsteinThis patch looks great - thanks. Please verify that things are registering as expected in the CI bot and this is good to go!
Comment #18
daggerhart CreditAttribution: daggerhart commentedVerified the tests are being picked up, running and passing. Merging now, thanks!
Comment #20
daggerhart CreditAttribution: daggerhart commentedMerged into 8.x-1.x