[ Index ]

PHP Cross Reference of YOURLS

title

Body

[close]

/tests/tests/format/ -> urls.php (summary)

(no description)

File Size: 295 lines (16 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Format_URL:: (17 methods):
  tearDown()
  list_of_schemes()
  test_correcttly_get_protocols()
  list_of_valid_URLs()
  test_valid_urls()
  test_url_with_spaces()
  test_url_with_bad_characters()
  test_url_with_protocols()
  list_of_mixed_case()
  test_url_with_protocol_case()
  list_of_IDN()
  test_url_with_IDN()
  list_of_urls_with_and_without_https()
  test_matching_protocols_with_no_ssl()
  test_matching_protocols_with_ssl()
  list_of_idn_punycode_utf8_rtl()
  test_various_idn_cases()


Class: Format_URL  - X-Ref

Formatting functions for URLs

tearDown()   X-Ref
No description

list_of_schemes()   X-Ref
List of schemes to test. Structure: array( string to test, expected scheme )


test_correcttly_get_protocols( $test_this, $expected )   X-Ref
Correctly get protocols

since: 0.1

list_of_valid_URLs()   X-Ref
List of valid URLs that should not be changed when sanitized


test_valid_urls( $url )   X-Ref
Test that valid URLs are not modified

since: 0.1

test_url_with_spaces()   X-Ref
URL with spaces

since: 0.1

test_url_with_bad_characters()   X-Ref
URL with bad chars

since: 0.1

test_url_with_protocols()   X-Ref
Test valid, missing and fake protocols

since: 0.1

list_of_mixed_case()   X-Ref
List of URLs with MiXeD CaSe to test. Structure: array( sanitized url, unsanitized url with mixed case )


test_url_with_protocol_case( $sanitized, $unsanitized )   X-Ref
Protocol and domain with mixed case

since: 0.1

list_of_IDN()   X-Ref
List of URLs with IDN domain, and how YOURLS should sanitize them


test_url_with_IDN( $unsanitized, $sanitized )   X-Ref
Protocol and domain with mixed case


list_of_urls_with_and_without_https()   X-Ref
List of URLS and expected matches whether we're on SSL or not.
Structure: array(original URL, expected URL if we're on HTTP, expected URL if we're on HTTPS)


test_matching_protocols_with_no_ssl( $url, $without_ssl, $with_ssl )   X-Ref
Test matching protocol with no SSL

Feed URL and return a result that matches "http"


test_matching_protocols_with_ssl( $url, $without_ssl, $with_ssl )   X-Ref
Test matching protocol with SSL

Feed URL and return a result that matches "https"


list_of_idn_punycode_utf8_rtl()   X-Ref
List of various valid URL with mixed scenarios of IDN
Structure: array(URL, expected URL after yourls_sanitize_url (and especially yourls_normalize_uri(), which deals with IDN)


test_various_idn_cases($url, $expected)   X-Ref
Test various cases : domain name / TLD / path with ascii, punycode, utf8 and RTL




Generated: Tue Sep 27 05:10:01 2022 Cross-referenced by PHPXref 0.7.1