See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 39 and 401]
HTTPS find and replace Tests
Copyright: | Copyright (c) 2016 Blackboard Inc. (http://www.blackboard.com) |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 426 lines (18 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
httpsreplace_test:: (11 methods):
upgrade_http_links_provider()
get_converted_http_link()
test_upgrade_http_links()
http_link_stats_provider()
test_http_link_stats()
test_links_and_text()
test_httpwwwroot()
test_upgrade_http_links_excluded_tables()
test_renames()
test_multiple()
test_reserved_words()
tool_httpreplace_url_finder_mock:: (1 method):
check_domain_availability()
Class: httpsreplace_test - X-Ref
Tests the httpsreplace tool.upgrade_http_links_provider() X-Ref |
Data provider for test_upgrade_http_links |
get_converted_http_link($path) X-Ref |
Convert the HTTP external test file URL to use HTTPS. Note: We *must not* use getExternalTestFileUrl with the True option here, becase it is reasonable to have only one of these set due to issues with SSL certificates. param: string $path Path to be rewritten return: string |
test_upgrade_http_links($content, $ouputregex, $expectedcontent) X-Ref |
Test upgrade_http_links param: string $content Example content that we'll attempt to replace. param: string $ouputregex Regex for what output we expect. param: string $expectedcontent What content we are expecting afterwards. |
http_link_stats_provider() X-Ref |
Data provider for test_http_link_stats |
test_http_link_stats($content, $domain, $expectedcount) X-Ref |
Test http_link_stats param: string $content Example content that we'll attempt to replace. param: string $domain The domain we will check was replaced. param: string $expectedcount Number of urls from that domain that we expect to be replaced. |
test_links_and_text() X-Ref |
Test links and text are not changed |
test_httpwwwroot() X-Ref |
If we have an http wwwroot then we shouldn't report it. |
test_upgrade_http_links_excluded_tables() X-Ref |
Test that links in excluded tables are not replaced |
test_renames() X-Ref |
Test renamed domains |
test_multiple() X-Ref |
When there are many different pieces of contents from the same site, we should only run replace once |
test_reserved_words() X-Ref |
Test the tool when the column name is a reserved word in SQL (in this case 'where') |
Class: tool_httpreplace_url_finder_mock - X-Ref
Class tool_httpreplace_url_finder_mock for testing replace tool without calling curlcheck_domain_availability($url) X-Ref |
Check if url is available (check hardcoded for unittests) param: string $url return: bool |