Closed (fixed)
Project:
Drupal core
Version:
8.3.x-dev
Component:
datetime.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Mar 2017 at 01:34 UTC
Updated:
24 Mar 2017 at 01:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mpdonadioComment #3
mpdonadioThe more I look at this, the more confused I am. If datetime_range.module is not enabled, why is the autoloader finding the DateRangeItem class?
Comment #4
jhedstromI wonder if the autoloader works differently when tests are running, or something like that?
Regardless, this is a clear bug and a very easy fix.
Comment #5
xjmLet's just make sure it actually is working in light of the autoloader/module enabled thing. I wouldn't be surprised if this was different in tests but just to make sure.
Comment #7
mpdonadio@tim.plunkett helped me understand this. In Drupal\simpletest\TestDiscovery::registerTestNamespaces() we have
I believe this is so that a class in a test can be resolved properly with the autoloader before the setUp() enables it.
Comment #8
xjmAh, #7 totally makes sense!
#5 has fewer fails than I was expecting, but does still prove it's actually being used.
Comment #11
xjmCommitted to 8.4.x, thanks! I also cherry-picked it to 8.3.x as a test coverage fix.