Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
tests
Priority:
Critical
Category:
Task
Assigned:
Reporter:
Created:
14 Aug 2008 at 23:44 UTC
Updated:
14 Jul 2012 at 19:25 UTC
Jump to comment: Most recent file
When running the Drupal HTTP request test an exception in generated. That can be removed by adding @ to parse_url().
Since the code checks to make sure that it parsed the URL successfully and returns error messages anyway it would seem to make sense that the function would mask the errors triggered.
Updated test to include actual page fetch test.
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | drupal_http_request.test_2.patch | 1.11 KB | mustafau |
| #12 | drupal_http_request.test.patch | 3.94 KB | boombatower |
| #10 | 295564-drupal-http-request.test.patch | 3.75 KB | damien tournoud |
| #9 | 295564-drupal-http-request.test.patch | 3.3 KB | damien tournoud |
| #7 | drupal_http_request.test.patch | 1.62 KB | boombatower |
Comments
Comment #1
obsidiandesign commentedIs this a different approach/related to #283806: Notice appears when drupal_http_request called with an invalid URL? I found both when searching for information about the Drupal HTTP request test.
Comment #2
boombatower commentedI've commented on the other issue.
Comment #3
catchCrtical since this is now our only remaining test with any kind of breakage, review forthcoming.
Comment #4
catchMakes sense to me to rely on our internal error handling and suppress the php warnings in the function call rather than just the test. This removes the exception, adds an extra test, lovely.
Comment #5
damien tournoud commentedPlease we can do better than that:
Comment #6
boombatower commentedMeaning get rid of !== FALSE? The reason that is there is I'm not sure if assertTrue is type strict. If not that strpos returning 0 would fail even thought that is success.
Since the page should never have the as the first character we could consider that a fail anyway. I'll remove the !== FALSE.
Comment #7
boombatower commentedUpdated, per #5-6.
Comment #8
boombatower commentedStill passes and already reviewed per #4.
Comment #9
damien tournoud commentedI should have been clearer. I meant that we have a whole facility for asserting things on pages with DrupalWebTestCase, we should use it.
Comment #10
damien tournoud commentedOups, here is a new version that fixes an exception in DrupalWebTestCase::getUrl().
Comment #11
boombatower commentedI realized that, but didn't use it since you can't without setting the content. Wasn't sure that was something we wanted to do.
I like what you've done, I'll take a look at it shortly.
Comment #12
boombatower commentedI like that you can set the content now, it has grown on me after thinking about it. I have added a more detailed description of the uses for drupalSetContent() and fixed a formatting issue related to the function indentation.
The test still passes and we both have reviewed this format.
Comment #13
dries commentedCommitted to CVS HEAD. Thanks.
Comment #14
boombatower commentedThat means we are at 100% pass!
Comment #15
webchickYYYYAAAAAAAAAYYYYYYYYYY!!!!!!!!!
Best. Day. EVER! :)
Comment #16
mustafau commentedThe tests committed with this patch were reverted by the DB:TNG patch. See: http://cvs.drupal.org/viewvc.py/drupal/drupal/modules/simpletest/tests/c...
Comment #17
damien tournoud commentedComment #18
boombatower commentedDoesn't it just need to be reapplied...not worked on?
Comment #19
dries commentedDoesn't apply.
Comment #20
mustafau commentedRe-roll.
Comment #21
boombatower commentedTest still passes after applicate, as before...looks good.
Comment #22
boombatower commentededit: wrong issue.
Comment #23
boombatower commentedComment #24
dries commentedCode no longer applies.
Comment #25
mustafau commentedPatch at #20 still applies.
Comment #26
dries commentedCommitted to CVS HEAD. Thanks.
Comment #27
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.