MDL-61143 core_files: Update unit tests for curl_security_helper
authorCameron Ball <cameron@moodle.com>
Wed, 3 Jan 2018 08:10:37 +0000 (16:10 +0800)
committerMr. Jenkins (CiBoT) <cibot@moodle.org>
Tue, 9 Jan 2018 08:54:32 +0000 (16:54 +0800)
commit4cca0082df161868e644c7a07ceefd46ada68a5d
tree1f2e6043f900a88505e86400f26656fa88a3a418
parentfbe7f1f8ba8fac554d0db657f1e07aca6308992f
MDL-61143 core_files: Update unit tests for curl_security_helper

Previously some of the unit tests were passing "by accident" becuase
we had the security helper letting through domains where the DNS lookup
failed. That behaviour has changed and now such domains are blocked.

Additionally tests for domains with multiple A records and weird Unicode
stuff have been added.

This patch also mocks the DNS resolution in the test, rather than actually
resolving the domain.
lib/tests/curl_security_helper_test.php