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.
file core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationTest.php
filename is LocaleTranslationTest.php
classname is TranslationStringTest
The test does not appear in the list of the tests and it also does not run when all tests are started
Solution: rename the classname into LocaleTranslationTest.
Comment | File | Size | Author |
---|---|---|---|
#12 | wrong_test_class_name_TranslationStringTest-1830934-12.patch | 1.08 KB | Carsten Müller |
#1 | wrong_test_class_name_TranslationStringTest-1830934-1.patch | 560 bytes | Carsten Müller |
Comments
Comment #1
Carsten Müller CreditAttribution: Carsten Müller commentedpatch to rename the classname of this test
Comment #2
BerdirThere is an issue somewhere that is supposed to detect this.
Comment #3
penyaskitoI only found this change record ([#1543796]), and says nothing about the class names, just about namespaces.
Could you share the link?
Comment #4
Berdir#1632364: Write tests to ensure that all classes in Drupal can actually be found by the autoloader. Anyway, this is just related, and shouldn't hold up this from getting in.
Comment #5
Carsten Müller CreditAttribution: Carsten Müller commentedI will search the tests if there are others, that are actually not running because of a wrong classname.
Where do i put the patches (if there are more needed), in this issue or in #1632364: Write tests to ensure that all classes in Drupal can actually be found by the autoloader. ?
Or do i create a separate issue for each class?
Comment #6
penyaskitoOk, I'll try to push there.
BTW, I tested this and for me is RTBC and pretty important to have it commited ASAP.
I'd like to update the priority but I don't want to be punched. Berdir, please do if you agree.
Comment #7
BerdirYes, I think this is quite important and just needs a commit once back from the testbot.
Comment #8
Eric_A CreditAttribution: Eric_A commentedFile header doc needs work.
Comment #10
Carsten Müller CreditAttribution: Carsten Müller commentedComment #11
BerdirThe now found test class seems to be throwing an exception now, which is a very good reason this is major:)
Comment #12
Carsten Müller CreditAttribution: Carsten Müller commentedthe testJavaScriptTranslation() failed because of a wrong database table column name
new patch:
Comment #13
Eric_A CreditAttribution: Eric_A commentedEDIT: I meant Language, not Translation. Fixed that.
The new coding standard is "Contains Drupal\...", but yes, often enough new code does not comply. And old code has not been fixed yet. (#1392754: Comply with new documentation standards for @file for namespaced class files)
I'm curious in which issue/ commit the file/class (and column) naming went wrong. Possibly one of the Locale => Language issues.
Comment #15
BerdirThis failed with this error:
Looks completely unrelated, so maybe a random testfailure, let's try again.
Comment #16
Berdir#12: wrong_test_class_name_TranslationStringTest-1830934-12.patch queued for re-testing.
Comment #17
Carsten Müller CreditAttribution: Carsten Müller commentedi just tried the test locally and it passed, at the moment second try is running locally
Comment #18
BerdirNow it passed, confirmed that the test is in the list and green. RTBC.
Comment #19
webchickCommitted and pushed to 8.x. Thanks!