/** * Test for \core\files\curl_security_helper->port_is_blocked(). * * @param int|string $port the port to validate. * @param string $allowedports the list of allowed ports. * @param bool $expected the expected result. * @dataProvider curl_security_port_data_provider */ public function test_curl_security_helper_port_is_blocked($port, $allowedports, $expected) { $this->resetAfterTest(true); $helper = new \core\files\curl_security_helper(); set_config('curlsecurityallowedport', $allowedports); $this->assertEquals($expected, phpunit_util::call_internal_method($helper, 'port_is_blocked', [$port], '\\core\\files\\curl_security_helper')); }