Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
locale.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Sep 2014 at 19:15 UTC
Updated:
30 Sep 2014 at 12:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
gábor hojtsyBut locale_test_translate does not depend on locale and/or update?
Comment #2
sutharsan commentedLocaleUpdateInterfaceTest extends LocaleUpdateBase (test base class). LocaleUpdateBase class defines:
public static $modules = array('update', 'update_test', 'locale', 'locale_test');. The locale_test_translate module does not depend on any module. LocaleUpdateInterfaceTest requires 'locale', 'locale_test' and 'locale_test_translate'. I have looked at a few test classes that extend a base test class. (most) test classes that extend test base classes do not re-define the required modules that are already defined by the base test class. Does that answer your question?Comment #3
gábor hojtsyBut its the same public static property. How redefining it will not make those base modules removed?
Comment #4
sutharsan commentedDunno, it works (not my most convincing answer ;) ). Perhaps better: a few examples that do the same:
Comment #5
gábor hojtsyI don't see how that one would work well given that in PHP the extending class overrides the base class' property when doing this. The other two changes look perfect BTW :)
Comment #6
sutharsan commentedIt is because of
$modulesis a static property. This is the issue that made it happen: #1380958: Replace $modules list for WebTestBase::setUp() with ::$modules class properties. WebTestBase cycles through (parent) classes and collects all modules.Comment #7
benjf commentedUpdated patch with a few more unused 'use' statements removed. Otherwise, it looks good to me!
Comment #8
benjf commentedadding interdiff for the last patch
Comment #9
yesct commentedI read the whole patch.
Changes all look good.
Inspected locale tests and this gets all the un-used uses there.
We can keep this small and not expand the scope too far. A good small improvement.
Comment #10
alexpottCommitted ab50db3 and pushed to 8.0.x. Thanks!
Comment #12
gábor hojtsyYay, thanks. Also thanks @Sutharsan for diving in and helping me learn :)