Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
link.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Oct 2015 at 22:40 UTC
Updated:
3 Dec 2015 at 17:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mikeryanComment #3
mikeryanWe really want this in so we don't have to work around it in #2590993: Create stub entities with proper default values.
Comment #4
dawehnerSeems reasonable, do we have some tests for any other of those random value functions?
Comment #5
mikeryanI started on a general unit test Friday for the field types that are validated by PrimitiveTypeConstraint, got hung up trying to mock everything though...
Comment #6
mikeryanThe test I started on...
Comment #7
mikeryanOK, never mind going out of scope with broad tests, let's focus on this issue here...
Comment #10
mikeryan/me misses the retest button...
Comment #12
quietone commenteduse count since sizeof is an alias of count?
Comment #13
mikeryanThe sizeof() is existing code, didn't see a need to change that.
Comment #14
phenaproximaI can see this causing all sorts of chaos if the generated URI is run through the path validation service. Ideally this should just point to a route we know exists, like or a random node or something like that.
These should use FieldConfig::create(), not the deprecated entity_create().
Comment #15
mikeryanThe purpose of generateSampleValue() is to generate random content - the primary use case today is devel-generate. I see no chaos here - the results of $random->name() will be syntactically correct.
Done.
Comment #16
webchickTalked this over with catch, he said he was fine with this being an rc target since it blocks a migrate critical and is a basic bug fix + tests. Tagging accordingly.
Comment #17
phenaproximaI think it looks good. Nice and thorough.
Comment #18
webchickCommitted and pushed to 8.0.x. Thanks!