| [ Index ] |
PHP Cross Reference of YOURLS |
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 316 lines (12 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
FormatTest:: (27 methods):
serialize_data()
not_serialized_data()
test_is_serialized()
test_is_not_serialized()
test_maybe_unserialize_serialized()
test_maybe_unserialize_passthrough()
rnd_string_types()
test_rnd_string_types()
test_rnd_string_custom_charlist()
conversion_charsets()
rand_str_from()
test_int_to_string_to_int()
test_string_to_int_to_string()
test_string2htmlid()
test_valid_regexp()
test_trim_long_strings()
test_is_utf8()
test_is_not_utf8()
valid_utf8()
invalid_utf8()
get_data()
test_backslashit()
test_bookmarklet()
test_specialchars_decode_basics()
test_specialchars_escapes_quotes()
test_specialchars_allowed_entities()
test_specialchars_unallowed_entities()
Class: FormatTest - X-Ref
General formatting functions.| serialize_data() X-Ref |
| Data to serialize |
| not_serialized_data() X-Ref |
| Unserialized data |
| test_is_serialized( $data ) X-Ref |
| Check that yourls_is_serialized detects serialized data |
| test_is_not_serialized( $data ) X-Ref |
| Check that yourls_is_serialized doesn't assume garbage is serialized |
| test_maybe_unserialize_serialized( $data ) X-Ref |
| yourls_maybe_unserialize() unserializes serialized data, and leaves the rest untouched |
| test_maybe_unserialize_passthrough($data) X-Ref |
| yourls_maybe_unserialize() returns non-serialized input as-is |
| rnd_string_types() X-Ref |
| Charsets used by yourls_rnd_string(). Structure: [type, expected character pool] |
| test_rnd_string_types( $type, $pool ) X-Ref |
| yourls_rnd_string() honors the requested length and only uses characters from the pool matching the requested type |
| test_rnd_string_custom_charlist() X-Ref |
| type 0 with a custom char list uses only that list Note: the result is str_shuffle()+substr(), so its length is capped at the size of the pool ; we use a pool larger than the requested length. |
| conversion_charsets() X-Ref |
| Short URL charsets for the int<->string - null : the charset currently in effect (driven by YOURLS_URL_CONVERT) - base 36 : '0-9a-z' (YOURLS_URL_CONVERT = 36, or anything but 62/64) - base 62 : '0-9a-zA-Z' (YOURLS_URL_CONVERT = 62 or 64) |
| rand_str_from( string $chars, int $len ) X-Ref |
| Random string using only characters from $chars |
| test_int_to_string_to_int( $chars ) X-Ref |
| Integer (1337) to string (3jk) to integer |
| test_string_to_int_to_string( $chars ) X-Ref |
| String (3jk) to integer (1337) to string |
| test_string2htmlid() X-Ref |
| Checking that yourls_unique_element_id is a unique string |
| test_valid_regexp() X-Ref |
| Generating valid regexp from the allowed charset |
| test_trim_long_strings() X-Ref |
| Trim long strings |
| test_is_utf8( $string ) X-Ref |
| Return true for UTF8 strings Note: As of 1.7.1, function yourls_seem_utf8() is still unused. In 2.0 consider simply deleting it if still not needed |
| test_is_not_utf8( $string ) X-Ref |
| Return false for non UTF8 strings Note: As of 1.7.1, function yourls_seem_utf8() is still unused. In 2.0 consider simply deleting it if still not needed |
| valid_utf8() X-Ref |
| No description |
| invalid_utf8() X-Ref |
| No description |
| get_data( $filename ) X-Ref |
| Parse a file and return its content as a data provider |
| test_backslashit() X-Ref |
| Test yourls_backslashit |
| test_bookmarklet() X-Ref |
| Test the bookmarklet generator Note: we're not testing that the bookmarklet generator produces valid JS code: the bookmarklet class has tests for this, see https://github.com/ozh/bookmarkletgen We're just testing that content is returned |
| test_specialchars_decode_basics() X-Ref |
| Test yourls_specialchars basics |
| test_specialchars_escapes_quotes() X-Ref |
| Test yourls_specialchars escape quotes |
| test_specialchars_allowed_entities() X-Ref |
| Test yourls_specialchars doesn't change allowed entities |
| test_specialchars_unallowed_entities() X-Ref |
| Test yourls_specialchars with unallowed entities |
| Generated: Sat Jul 11 05:10:54 2026 | Cross-referenced by PHPXref 0.7.1 |