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
The StackKernelIntegrationTest
does not detect when something goes wrong within the call to handle()
.
Proposed resolution
Set the optional $catch
argument of handle()
to FALSE
. Then fix the test.
Alternatively it would be possible to just assert that the status code of the response is 200.
Remaining tasks
User interface changes
API changes
Follow-up to #2303673: Implement stackphp; cleanup handlePageCache() and preHandle()
Comment | File | Size | Author |
---|---|---|---|
#5 | interdiff.txt | 2 KB | znerol |
#5 | 2347111-stack-kernel-fix-integration-test-5.diff | 2.44 KB | znerol |
#4 | 2347111-stack-kernel-fix-integration-test-4.diff | 1.25 KB | znerol |
#1 | 2347111-stack-kernel-integration-test-is-bogus.diff | 1.05 KB | znerol |
Comments
Comment #1
znerol CreditAttribution: znerol commentedComment #3
znerol CreditAttribution: znerol commentedThe test failure in #1 demonstrates whats wrong with the test.
Comment #4
znerol CreditAttribution: znerol commentedSeems like
system.timezone
is the only route in thesystem
module which can be accessed without authentication and without triggering storage/cache. This looks rather brittle though. Anyone has a better idea?Comment #5
znerol CreditAttribution: znerol commentedLet's just add a mock-controller in the
httpkernel_test
module.Comment #6
Fabianx CreditAttribution: Fabianx commentedLooks great to me! :)
Comment #8
Fabianx CreditAttribution: Fabianx commentedProbably needs a reroll ...
Comment #10
Crell CreditAttribution: Crell commentedTestbot hiccuped last night, so re-RTBCing and testing. Bot will bump it back if necessary.
Comment #11
Fabianx CreditAttribution: Fabianx commentedComment #12
alexpottCommitted 5f1d08d and pushed to 8.0.x. Thanks!