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.
Compile urls with/without query, with/without fragment, absolute on/off and assert all that works when clean URLs are on and off. That wll be 16 url calls and asserts.
Comment | File | Size | Author |
---|---|---|---|
#20 | url_test_linebreak_296324.patch | 784 bytes | JuliaKM |
#15 | url_test_1_1.patch | 4.04 KB | pamelad |
#13 | url_test_1.patch | 3.58 KB | kscheirer |
#6 | url_test.patch | 3.41 KB | R.Muilwijk |
Comments
Comment #1
kkaefer CreditAttribution: kkaefer commentedComment #2
swentel CreditAttribution: swentel commentedIs url('cron.php') also considered as a internal url, or external (see issue http://drupal.org/node/296321) ?
Comment #3
Damien Tournoud CreditAttribution: Damien Tournoud commentedSee also #296466: TestingParty08: Cron tests should pass without clean-urls enabled.
Comment #4
chx CreditAttribution: chx commentedInternal means a Drupal path handled by the menu system.
Comment #5
R.Muilwijk CreditAttribution: R.Muilwijk commentedComment #6
R.Muilwijk CreditAttribution: R.Muilwijk commentedI'm having problems doing this test... the problem is in the code of url:
as you can see $script and $clean_url are saved in a static which means this function can only be tested in different page loads with fake modules or something.. is that the way to go?
Comment #7
lilou CreditAttribution: lilou commentedComment #9
lilou CreditAttribution: lilou commentedSee: #335122: Test clean HEAD after every commit and http://pastebin.ca/1258476
Comment #11
kscheirer@lilou: that pastebin is expired, was there anything useful for this patch in there? I'd still like to see some tests for url() go in.
Comment #12
lilou CreditAttribution: lilou commented@kscheirer : no, it was the list of issues.
Comment #13
kscheirerHere's an initial set of 16 tests, hopefully what chx was looking for. R.Muilwijk, I think you were trying to check for too many possible configurations, so I tried to keep it simple. Maybe I have missed some possibilities though? Also moved the test into the same area as the rest of the l() and url() function tests.
Comment #14
pamelad CreditAttribution: pamelad commentedAssigned to myself for review.
Comment #15
pamelad CreditAttribution: pamelad commentedPatched looked good. I added two lines to test passing '< front >' as the first parameter (one line each for clean_url on/off).
Comment #16
cwgordon7 CreditAttribution: cwgordon7 commentedLooks great, tests pass, RTBC.
Comment #17
webchickHeh. That's a clever way to write this test!
I couldn't find anything to complain about other than the lines are VERY long (but they're also t() strings which are long by nature) and PHPDoc didn't wrap at 80 chars, and... CRAP I meant to fix that before I committed but I forgot. I'll go start a novice issue. :P
Committed to HEAD. ;)
Comment #18
webchickEh. I'll just re-open this one. :)
Hello, Novice! Your task is to wrap the comment at the top of function testUrl() in modules/simpletest/tests/common.test at 80 characters. Thanks! :)
Comment #19
dmitrig01 CreditAttribution: dmitrig01 commentedComment #20
JuliaKM CreditAttribution: JuliaKM commentedHere's a patch to wrap the comments attached to testUrl() at 80 characters.
Comment #21
webchickThank you Julia, for satisfying my inner neat freak. :)
Committed to HEAD.