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
A bunch node access tests are functional tests but they don't make any HTTP requests.
Proposed resolution
Convert them to kernel tests using a new NodeAccessTestBase class that these tests can use.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
N/A
Comment | File | Size | Author |
---|---|---|---|
#2 | 3041863.patch | 14.39 KB | amateescu |
Comments
Comment #2
amateescu CreditAttribution: amateescu commentedHere we go.
Comment #3
claudiu.cristeaIt seems that, for Kernel tests, `$this->container` is safe. See @alexpott's comment #2066993-57: Use \Drupal consistently in tests ad this discussion https://drupal.slack.com/archives/C223PR743/p1552894588175000
Comment #4
LendudeThat diff is pretty hard to read, it's a lot of red and not that much green, at first glance it looks like there are all sorts of thing getting lost. I applied the patch and analysed it manually and I don't see anything getting lost, so that is great! Not sure why the diff looks like it does.
Updated the IS to inform readers about the new TestBase class.
Don't think #3 is blocking since we have both still in core?
Comment #5
catchCommitted 084b1e4 and pushed to 8.8.x. Thanks!