Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
field system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Oct 2015 at 19:11 UTC
Updated:
3 Dec 2015 at 17:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mikeryanTried to start with a unit test to demonstrate the failure, but got hung up trying to figure out how to mock the pieces to get me a field definition to pass generateSampleValue(). So, for now, here's just a fix without a test...
Comment #3
mikeryanAiming for RC because without it we'll need a work-around in #2590993: Create stub entities with proper default values.
Comment #4
mikeryanMost of the other primitive types had tests for generateSampleValue(), added one to UriItemTest. That test seems rather thin generally compared to the other field types, but out-of-scope for this immediate issue...
Comment #7
mikeryanThat's better.
Comment #9
wim leersLooks great. Uses
\Drupal\Component\Utility\Random::word(), therefore it will always generate valid hostnames.Comment #11
webchickD'oh. Nice catch. Speaking of catch, showed this to him and he felt it was fine to get in during RC, so making an RC target.
Committed and pushed to 8.0.x. Thanks!