Problem/Motivation
Module dependency tests for the module installation process should include a test for modules that specify an incompatible PHP version.
Proposed resolution
Create the test.
Remaining tasks
Write and review.
User interface changes
N/A
API changes
N/A
Data model changes
N/A
rc eval: it's a test.
| Comment | File | Size | Author |
|---|---|---|---|
| #59 | add_test_for_enabling-2567861-59.patch | 1.72 KB | zeip |
| #56 | add_test_for_enabling-2567861-56.patch | 1.82 KB | zeip |
| #54 | add_test_for_enabling-2567861-54.patch | 1.82 KB | yogeshmpawar |
| #54 | interdiff-2567861-50-54.txt | 1.83 KB | yogeshmpawar |
| #50 | add_test_for_enabling-2567861-50.patch | 2.44 KB | zeip |
Comments
Comment #2
Antti J. Salminen commentedHere's a start based on chx giving good pointers on what's needed.
Comment #3
chx commentedThis is sheer wonderful, thanks so much. I recognize and appreciate the nod towards the 6502 :) did you have an Apple ][ or a Commodore 64?
Comment #6
Antti J. Salminen commented@chx: yeah I've got a C64, thought you might get the reference. :)
Stupid mistakes, should be better now.
Comment #7
Antti J. Salminen commentedComment #8
chx commentedYay, it's passing.
Comment #10
madhavvyas commentedExceedec 80 characters.
https://www.drupal.org/coding-standards#linelength
Comment #11
madhavvyas commentedFixed line length issue
Comment #12
madhavvyas commentedComment #13
madhavvyas commentedFound one comment was modified due to my last patch updated as per earlier.
Comment #14
chx commentedThanks for the comment fixes. "Checks functionality of project name spaces for dependencies." this one was correct in the original: it's one word, "namespace" both in PHP and programming in general
Comment #15
madhavvyas commentedOh! yes, I agree
I have updated my patch accordingly.
Comment #16
chx commentedLooks great.
Comment #20
Antti J. Salminen commentedStill passing and since this got bumped out of RTBC only because of a random test failure I'm setting it back to that.
Comment #21
madhavvyas commentedGreat!
Comment #22
Antti J. Salminen commentedComment #23
alexpottThese are out-of-scope changes that are not part of adding the test.
I think this test description should be different from the one below.
I don't think that the assertion message
'A module that depends on a module with an incompatible PHP version is marked as such.'adds much. Also looking at the test is it even necessary to have the module depending on a module with an impossible PHP version. I think even if that module was not there this test would pass - no?Comment #25
johnennew commentedI've made the changes suggested in #23.
1. Removed out of scope comment changes
2. Changed doc block comment
3. Changed test message and removed the additional dependent module
Comment #26
johnennew commentedSorry, patch with a better test message attached.
Comment #28
kekkisUpdated Version. Trying to work on this as part of Finnish monthly Drupal sprint.
Comment #29
kekkisAdded new patch removing one more out-of-scope comment change. See interdiff.
Comment #30
kekkisAnd of course the patch file I attached was the wrong one. Sorry about that. Redoing...
Comment #31
kekkisHere is the correct patch and the correct interdiff.
Comment #32
kekkisComment #33
kekkisComment #36
Antti J. Salminen commentedFixed the checkbox test to use the correct module name as that error got exposed by it failing with newer core.
Comment #38
Antti J. Salminen commentedLast one didn't do it. Removing [Testing] from the same exact line should.
Comment #39
Antti J. Salminen commentedComment #40
Munavijayalakshmi commentedRerolled the patch.
Comment #42
boaloysius commented@Munavijayalakshmi I also got the same patch as #40.
Comment #43
pfructuoso commentedCode review is ok to me and all tests are passing (on my local and CI), should we finally close the issue? :)
Comment #44
tstoecklerThis should be a single line (but still less than 80 characters).
Let's add a newline.
Comment #45
boaloysius commentedMade changes stated in #44
Comment #46
boaloysius commentedComment #47
tstoecklerSorry to be annoying but this is now longer than 80 characters. Maybe something like: "Tests that modules with unmet PHP version dependencies cannot be installed." ?
Comment #48
zeip commentedNew patch with shorter comment.
Comment #50
zeip commentedMy latest patch was missing the info file, sorry for that. Re-rolling with the info file onboard.
Comment #51
Anonymous (not verified) commentedRan automated test in local and #50 passes all test.
Comment #52
alexpottThis would be better to not use t() and just assert on the text rather then the actual html. See #2875148: BrowserTestBase: Steer new test development away from translation
Is this actually necessary? I don't think it is.
Comment #53
yogeshmpawarComment #54
yogeshmpawarChanges as per comment #52 & also added interdiff.
I am also think this is not necessary so removed it from current patch.
Comment #56
zeip commentedAdded the format_string() function to allow using the placeholders that broke when removing t().
Comment #57
Anonymous (not verified) commentedtested locally, the test passes with flying colors ;-)
Comment #58
alexpottformat_string() is deprecated and we shouldn't be adding new usages of it. You can use the FormattableMarkup class instead. Or you could do something like this:
Comment #59
zeip commentedGood catch, attached is a patch for this.
Comment #60
zeip commentedComment #61
tstoecklerAssuming the bot comes back green, this looks good. Thanks!
Comment #62
cilefen commentedI checked some boxes to update credit.
Comment #64
cilefen commentedCommitted 05ffa70 and pushed to 8.4.x. Please create interdiffs when changing patches. Thank you!