Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Please refer the problem/motivation section of #2737719: EntityResource: Provide comprehensive test coverage: for every entity type, every format, every method
Proposed resolution
Write EntityResourceTestBase subclass for the RestResourceConfig entity.
Remaining tasks
References
1. Follow-up of #2737719: EntityResource: Provide comprehensive test coverage: for every entity type, every format, every method
2. Subtask of #2824572: Write EntityResourceTestBase subclasses for every other entity type.
Comment | File | Size | Author |
---|---|---|---|
#7 | 2843773-7.patch | 9.2 KB | Wim Leers |
Comments
Comment #3
Wim LeersAs one of the maintainers of the REST module, I figured I'd take this one on :)
Comment #5
Wim LeersComment #6
tedbowCopy and paste error?
Copy/paste error? Also need description.
I don't understand why these expected dependencies pass? dblog? why not REST itself?
Comment #7
Wim Leersdblog
@RestResource
plugin :)dblog
because\Drupal\Tests\rest\Functional\EntityResource\RestResourceConfig\RestResourceConfigResourceTestBase::createEntity()
creates a REST resource config entity that uses thedblog
@RestResource
plugin.serialization
because this uses thejson
serialization format, which is provided by theserialization
moduleuser
because this uses thecookie
authentication mechanism, which is provided by theuser
moduleComment #8
tedbow@Wim Leers ok thanks
That only leaves my question in the last part of #6.3
Why would REST module also not be a dependency. I figure it has something to do with my lack of understanding of configuration management but it seems the config entity type is declared by the REST module so you would need it.
Comment #9
Wim LeersI see what you're saying now. I can see why you come to that conclusion, but that's indeed not how the config system works.
The
rest_resource_config
config entity type is declared by therest
module. Without therest
module, therest_resource_config
entity type simply does not exist. (And then this configuration would simply be ignored: it'd be a meaningless blob of data.)See for example
filter.format.basic_html
. It also doesn't list thefilter
module. Ortaxonomy.vocabulary.tags
, which also doesn't list thetaxonomy
module.Comment #10
tedbow@Wim Leers ok thanks for the explanation.
RTBC then!
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commentedNice!) Back to RTBC because a random fail.
Comment #14
Wim LeersDrupalCI infra fail.
Comment #15
alexpottCommitted and pushed c522c8f to 8.4.x and 09787b9 to 8.3.x. Thanks!
Backported to 8.3.x because its tests only.