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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Carsten Müller’s picture

Status: Active » Needs review
FileSize
560 bytes

patch to rename the classname of this test

Berdir’s picture

There is an issue somewhere that is supposed to detect this.

penyaskito’s picture

I only found this change record ([#1543796]), and says nothing about the class names, just about namespaces.
Could you share the link?

Berdir’s picture

#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.

Carsten Müller’s picture

I 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?

penyaskito’s picture

Status: Needs review » Reviewed & tested by the community

Ok, 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.

Berdir’s picture

Priority: Normal » Major

Yes, I think this is quite important and just needs a commit once back from the testbot.

Eric_A’s picture

File header doc needs work.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, wrong_test_class_name_TranslationStringTest-1830934-1.patch, failed testing.

Carsten Müller’s picture

Assigned: Unassigned » Carsten Müller
Berdir’s picture

Status: Needs review » Needs work

The now found test class seems to be throwing an exception now, which is a very good reason this is major:)

Carsten Müller’s picture

Status: Needs work » Needs review
FileSize
1.08 KB

the testJavaScriptTranslation() failed because of a wrong database table column name

new patch:

  • fixes the class name
  • fixes the file header
  • fixes the wrong column name
Eric_A’s picture

Status: Needs work » Needs review

EDIT: I meant Language, not Translation. Fixed that.

 /**
  * @file
- * Definition of Drupal\locale\Tests\TranslationStringTest.
+ * Definition of Drupal\locale\Tests\LocaleTranslationTest.
  */

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.

Status: Needs review » Needs work

The last submitted patch, wrong_test_class_name_TranslationStringTest-1830934-12.patch, failed testing.

Berdir’s picture

This failed with this error:

Fallback page title for user pages is 'User account' for anonymous users.	Other	UserAccountLinksTests.php	118	Drupal\user\Tests\UserAccountLinksTests->testAccountPageTitles()

Looks completely unrelated, so maybe a random testfailure, let's try again.

Berdir’s picture

Status: Needs work » Needs review
Carsten Müller’s picture

i just tried the test locally and it passed, at the moment second try is running locally

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

Now it passed, confirmed that the test is in the list and green. RTBC.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.