Closed (outdated)
Project:
Drupal core
Version:
9.3.x-dev
Component:
simpletest.module
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
13 May 2012 at 00:15 UTC
Updated:
27 Mar 2022 at 10:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
elvis2 commentedComment #2
elvis2 commentedChanged title.
Attached is a patch that adds two new parameters to the drupalGet() function.
In most of the *Test.php files where drupalGet() is called, within the next few lines, assertResponse() is called. I do not see any harm in keeping the tests the way they are but I would imagine the code would need to be refactored.
Later I will append a patch file to show how the above will change the aggregator module test code.
Comment #3
elvis2 commentedA re-roll of #2 - accommodating string vs array check and accepting response codes 200 or 204 when testCron is invoked.
Comment #4
elvis2 commentedThe attached patch is an example of how #3 would change uses of drupalGet() within aggregate simpletest code.
When testing locally you need to apply #3 first then this attached patch.
Comment #5
tim.plunkettI would put stuff like this inline.
Comment #7
elvis2 commented#3: 1574764-3-call-assertResponse-in-drupalGet.patch queued for re-testing.
Comment #9
elvis2 commented#3: 1574764-3-call-assertResponse-in-drupalGet.patch queued for re-testing.
Comment #10
dawehnerThis doesn't do anything so far.
Comment #23
mondrake