@@ -13,36 +13,41 @@ public function testIpv4()
1313 $ ip = new Ip ();
1414 $ ip ->setValue ('127.0.0.1 ' );
1515
16- $ this ->assertEquals ('127.0.0.1 ' , $ ip ->getValue ());
16+ $ this ->assertSame ('127.0.0.1 ' , $ ip ->getValue ());
1717 }
1818
1919 public function testIpv6 ()
2020 {
2121 $ ip = new Ip ();
2222 $ ip ->setValue ('2001:db8::1 ' );
2323
24- $ this ->assertEquals ('2001:db8::1 ' , $ ip ->getValue ());
24+ $ this ->assertSame ('2001:db8::1 ' , $ ip ->getValue ());
2525 }
2626
27- public function testInvalidIp ()
27+ public function testEmptyString ()
2828 {
2929 $ ip = new Ip ();
30+ $ ip ->setValue ('' );
3031
31- $ this ->expectException (InvalidArgumentException::class);
32- $ this ->expectExceptionMessage ('Validation failed for field Tpay\OpenApi\Model\Fields\Payer\IP: Invalid IP address. ' );
33-
34- $ ip ->setValue ('TEST123 ' );
32+ $ this ->assertSame ('' , $ ip ->getValue ());
3533 }
3634
3735 public function testNull ()
36+ {
37+ $ ip = new Ip ();
38+ $ ip ->setValue (null );
39+
40+ $ this ->assertSame (null , $ ip ->getValue ());
41+ }
42+
43+ public function testInvalidIp ()
3844 {
3945 $ ip = new Ip ();
4046
4147 $ this ->expectException (InvalidArgumentException::class);
42- $ this ->expectExceptionMessage ('Value of field Tpay\OpenApi\Model\Fields\Payer\IP is too short. Min required 3 ' );
4348 $ this ->expectExceptionMessage ('Validation failed for field Tpay\OpenApi\Model\Fields\Payer\IP: Invalid IP address. ' );
4449
45- $ ip ->setValue (null );
50+ $ ip ->setValue (' TEST123 ' );
4651 }
4752
4853 public function testWrongType ()
0 commit comments