1
0
Fork 0

Tidy and fix tests

pull/8458/head
johnstevenson 2019-11-30 15:45:54 +00:00
parent 74ba9decdf
commit 00da9b125d
1 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@ class NoProxyPatternTest extends TestCase
public function dataIpAddress() public function dataIpAddress()
{ {
$noproxy = '192.168.1.1, 192.168.1.2, 192.168.1.3, 2001:db8::52:0:1'; $noproxy = '192.168.1.1, 2001:db8::52:0:1';
// noproxy, url, expected // noproxy, url, expected
return array( return array(
@ -81,14 +81,14 @@ class NoProxyPatternTest extends TestCase
public function dataIpRange() public function dataIpRange()
{ {
$noproxy = '10.0.0.0/30, 2002:db8:a::45/64'; $noproxy = '10.0.0.0/30, 2002:db8:a::45/121';
// noproxy, url, expected // noproxy, url, expected
return array( return array(
'match IPv4/CIDR' => array($noproxy, '10.0.0.2', true), 'match IPv4/CIDR' => array($noproxy, '10.0.0.2', true),
'no match IPv4/CIDR' => array($noproxy, '10.0.0.4', false), 'no match IPv4/CIDR' => array($noproxy, '10.0.0.4', false),
'match IPv6/CIDR' => array($noproxy, '[2002:db8:a:0:0:0:0:123]', true), 'match IPv6/CIDR' => array($noproxy, '[2002:db8:a:0:0:0:0:7f]', true),
'no match IPv6' => array($noproxy, '[2001:db8::52:0:2]', false), 'no match IPv6' => array($noproxy, '[2002:db8:a:0:0:0:0:ff]', false),
'match mapped IPv4' => array($noproxy, '[::FFFF:0A00:0002]', true), 'match mapped IPv4' => array($noproxy, '[::FFFF:0A00:0002]', true),
'no match mapped IPv4' => array($noproxy, '[::FFFF:0A00:0004]', false), 'no match mapped IPv4' => array($noproxy, '[::FFFF:0A00:0004]', false),
); );