@@ -106,7 +106,7 @@ public function testInvalidIpAddressAndNetmask(string|\Stringable $cidr)
106106 /**
107107 * @dataProvider getOutOfRangeNetmask
108108 */
109- public function testOutOfRangeNetmask (string $ cidr , ?string $ version = null , ?int $ min = null , ?int $ max = null )
109+ public function testOutOfRangeNetmask (string $ cidr , int $ maxExpected , ?string $ version = null , ?int $ min = null , ?int $ max = null )
110110 {
111111 $ cidrConstraint = new Cidr ([
112112 'version ' => $ version ,
@@ -118,7 +118,7 @@ public function testOutOfRangeNetmask(string $cidr, ?string $version = null, ?in
118118 $ this
119119 ->buildViolation ('The value of the netmask should be between {{ min }} and {{ max }}. ' )
120120 ->setParameter ('{{ min }} ' , $ cidrConstraint ->netmaskMin )
121- ->setParameter ('{{ max }} ' , $ cidrConstraint -> netmaskMax )
121+ ->setParameter ('{{ max }} ' , $ maxExpected )
122122 ->setCode (Cidr::OUT_OF_RANGE_ERROR )
123123 ->assertRaised ();
124124 }
@@ -240,9 +240,9 @@ public static function getWithInvalidMasksAndIps(): array
240240 public static function getOutOfRangeNetmask (): array
241241 {
242242 return [
243- ['10.0.0.0/24 ' , Ip::V4 , 10 , 20 ],
244- ['10.0.0.0/128 ' ],
245- ['2001:0DB8:85A3:0000:0000:8A2E:0370:7334/24 ' , Ip::V6 , 10 , 20 ],
243+ ['10.0.0.0/24 ' , 20 , Ip::V4 , 10 , 20 ],
244+ ['10.0.0.0/128 ' , 32 ],
245+ ['2001:0DB8:85A3:0000:0000:8A2E:0370:7334/24 ' , 20 , Ip::V6 , 10 , 20 ],
246246 ];
247247 }
248248
0 commit comments