From 0c3de7f6f3857addb14e2c1c717056adb977f7ad Mon Sep 17 00:00:00 2001 From: Marcel Naeve Date: Sun, 5 May 2024 02:51:42 +0200 Subject: [PATCH] =?UTF-8?q?umbenennung=20der=20klasse=20r=C3=BCckg=C3=A4ng?= =?UTF-8?q?ig=20gemacht,=20da=20idee=20einer=20alternativen=20implementier?= =?UTF-8?q?ung=20verworfen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ....ValidateStatic.php => class.Validate.php} | 2 +- tests/test.class.Validate.php | 411 ++++++++++++++++++ tests/test.class.ValidateStatic.php | 411 ------------------ 3 files changed, 412 insertions(+), 412 deletions(-) rename src/{class.ValidateStatic.php => class.Validate.php} (99%) create mode 100644 tests/test.class.Validate.php delete mode 100644 tests/test.class.ValidateStatic.php diff --git a/src/class.ValidateStatic.php b/src/class.Validate.php similarity index 99% rename from src/class.ValidateStatic.php rename to src/class.Validate.php index f6c5193..d83ec63 100644 --- a/src/class.ValidateStatic.php +++ b/src/class.Validate.php @@ -8,7 +8,7 @@ namespace NAE\Validation; * @author Marcel Naeve * @package NAE\Validation */ -class ValidateStatic +class Validate { /** * Static method for validating email addresses with multiple secure levels and black- and whitelist. diff --git a/tests/test.class.Validate.php b/tests/test.class.Validate.php new file mode 100644 index 0000000..da7f95b --- /dev/null +++ b/tests/test.class.Validate.php @@ -0,0 +1,411 @@ + + * Date: 14.05.2016 + * Time: 11:25 + */ +class ValidateStaticTest extends TestCase +{ + /* + * Validate::email(); Tests + */ + public function testEmail_myEmail_level1() + { + $result = Validate::email("confu5ed@serious-pro.de"); + $this->assertTrue($result); + } + public function testEmail_myEmail_level2() + { + $result = Validate::email("confu5ed@serious-pro.de", 2); + $this->assertTrue($result); + } + public function testEmail_myEmail_level1_whitelisted() + { + $result = Validate::email("confu5ed@serious-pro.de", 1,["whitelist"=>["confu5ed@serious-pro.de"]]); + $this->assertTrue($result); + } + public function testEmail_myEmail_level1_not_in_whitelist() + { + $result = Validate::email("confu5ed@serious-pro.de", 1,["whitelist"=>["confu5ed@serious-pro.eu"]]); + $this->assertTrue($result); + } + public function testEmail_myEmail_level1_blacklisted() + { + $result = Validate::email("confu5ed@serious-pro.de",1,["blacklist"=>["confu5ed@serious-pro.de"]]); + $this->assertFalse($result); + } + public function testEmail_myEmail_level1_not_in_blacklist() + { + $result = Validate::email("confu5ed@serious-pro.de", 1,["blacklist"=>["confu5ed@serious-pro.eu"]]); + $this->assertTrue($result); + } + public function testEmail_myEmail_level2_whitelisted() + { + $result = Validate::email("confu5ed@serious-pro.de", 2,["whitelist"=>["confu5ed@serious-pro.de"]]); + $this->assertTrue($result); + } + public function testEmail_myEmail_level2_not_in_whitelist() + { + $result = Validate::email("confu5ed@serious-pro.de", 2,["whitelist"=>["confu5ed@serious-pro.eu"]]); + $this->assertTrue($result); + } + public function testEmail_myEmail_level2_blacklisted() + { + $result = Validate::email("confu5ed@serious-pro.de", 2,["blacklist"=>["confu5ed@serious-pro.de"]]); + $this->assertFalse($result); + } + public function testEmail_myEmail_level2_not_in_blacklist() + { + $result = Validate::email("confu5ed@serious-pro.de", 2,["blacklist"=>["confu5ed@serious-pro.eu"]]); + $this->assertTrue($result); + } + public function testEmail_random1_level1() + { + $result = Validate::email("tempus.lorem.fringilla@vitae.co.uk"); + $this->assertTrue($result); + } + public function testEmail_random2_level1() + { + $result = Validate::email("Etiam.ligula@et.com"); + $this->assertTrue($result); + } + public function testEmail_random3_level1() + { + $result = Validate::email("orci.tincidunt.adipiscing@famesacturpis.edu"); + $this->assertTrue($result); + } + public function testEmail_random4_level1() + { + $result = Validate::email("_______@example.com"); + $this->assertTrue($result); + } + public function testEmail_random5_level1() + { + $result = Validate::email("nonummy.Fusce.fermentum@ut.org"); + $this->assertTrue($result); + } + public function testEmail_random6_level1() + { + $result = Validate::email('"email"@example.com'); + $this->assertTrue($result); + } + public function testEmail_random7_level1() + { + $result = Validate::email('much."more\ unusual"@example.com'); + $this->assertTrue($result); + } + public function testEmail_random8_level1() + { + $result = Validate::email('very.unusual."@".unusual.com@example.com'); + $this->assertTrue($result); + } + public function testEmail_random9_level1() + { + $result = Validate::email('very."(),:;<>[]".VERY."very@\\"very".unusual@strange.example.com'); + $this->assertTrue($result); + } + public function testEmail_random10_level2() + { + $result = Validate::email('very."(),:;<>[]".VERY."very@\\"very".unusual@serious-pro.de', 2); + $this->assertTrue($result); + } + public function testEmail_invalid1_level1() + { + $result = Validate::email("me@me@serious-pro.de"); + $this->assertFalse($result); + } + public function testEmail_invalid2_level1() + { + $result = Validate::email("me me@serious-pro.de"); + $this->assertFalse($result); + } + public function testEmail_invalid3_level1() + { + $result = Validate::email("me@serious pro.de"); + $this->assertFalse($result); + } + + /* + * Validate::ipv4(); Tests + */ + public function testIPv4_v4_localhost() + { + $this->assertTrue( Validate::ipv4("127.0.0.1") ); + } + public function testIPv4_v4_network() + { + $this->assertTrue( Validate::ipv4("192.168.178.1") ); + } + public function testIPv4_v4_googledns1() + { + $this->assertTrue( Validate::ipv4("8.8.8.8") ); + } + public function testIPv4_v4_googledns2() + { + $this->assertTrue( Validate::ipv4("8.8.4.4") ); + } + public function testIPv4_v4_mask() + { + $this->assertTrue( Validate::ipv4("255.255.255.255") ); + } + public function testIPv4_v4_zero() + { + $this->assertTrue( Validate::ipv4("0.0.0.0") ); + } + public function testIPv4_v4_tomuch() + { + $this->assertFalse( Validate::ipv4("256.255.255.255") ); + } + public function testIPv4_domain() + { + $this->assertFalse( Validate::ipv4("serious-pro.de") ); + } + public function testIPv4_v6_localhost() + { + $this->assertFalse( Validate::ipv4("::1") ); + } + public function testIPv4_v6_googledns1() + { + $this->assertFalse( Validate::ipv4("2001:4860:4860::8888") ); + } + public function testIPv4_v6_googledns2() + { + $this->assertFalse( Validate::ipv4("2001:4860:4860::8844") ); + } + + /* + * Validate::ipv6(); Tests + */ + public function testIPv6_v4_localhost() + { + $this->assertFalse( Validate::ipv6("127.0.0.1") ); + } + public function testIPv6_v4_network() + { + $this->assertFalse( Validate::ipv6("192.168.178.1") ); + } + public function testIPv6_v4_googledns1() + { + $this->assertFalse( Validate::ipv6("8.8.8.8") ); + } + public function testIPv6_v4_googledns2() + { + $this->assertFalse( Validate::ipv6("8.8.4.4") ); + } + public function testIPv6_v4_mask() + { + $this->assertFalse( Validate::ipv6("255.255.255.255") ); + } + public function testIPv6_v4_zero() + { + $this->assertFalse( Validate::ipv6("0.0.0.0") ); + } + public function testIPv6_v4_tomuch() + { + $this->assertFalse( Validate::ipv6("256.255.255.255") ); + } + public function testIPv6_domain() + { + $this->assertFalse( Validate::ipv6("serious-pro.de") ); + } + public function testIPv6_v6_localhost() + { + $this->assertTrue( Validate::ipv6("::1") ); + } + public function testIPv6_v6_googledns1() + { + $this->assertTrue( Validate::ipv6("2001:4860:4860::8888") ); + } + public function testIPv6_v6_googledns2() + { + $this->assertTrue( Validate::ipv6("2001:4860:4860::8844") ); + } + + /* + * Validate::ip(); Tests + */ + public function testIP_v4_localhost() + { + $this->assertTrue( Validate::ip("127.0.0.1") ); + } + public function testIP_v4_network() + { + $this->assertTrue( Validate::ip("192.168.178.1") ); + } + public function testIP_v4_googledns1() + { + $this->assertTrue( Validate::ip("8.8.8.8") ); + } + public function testIP_v4_googledns2() + { + $this->assertTrue( Validate::ip("8.8.4.4") ); + } + public function testIP_v4_mask() + { + $this->assertTrue( Validate::ip("255.255.255.255") ); + } + public function testIP_v4_zero() + { + $this->assertTrue( Validate::ip("0.0.0.0") ); + } + public function testIP_v4_tomuch() + { + $this->assertFalse( Validate::ip("256.255.255.255") ); + } + public function testIP_domain() + { + $this->assertFalse( Validate::ip("serious-pro.de") ); + } + public function testIP_v6_localhost() + { + $this->assertTrue( Validate::ip("::1") ); + } + public function testIP_v6_googledns1() + { + $this->assertTrue( Validate::ip("2001:4860:4860::8888") ); + } + public function testIP_v6_googledns2() + { + $this->assertTrue( Validate::ip("2001:4860:4860::8844") ); + } + public function testIP_empty() + { + $this->assertFalse( Validate::ip("") ); + } + public function testIP_trash1() + { + $this->assertFalse( Validate::ip("%") ); + } + public function testIP_trash2() + { + $this->assertFalse( Validate::ip("~") ); + } + public function testIP_trash3() + { + $this->assertFalse( Validate::ip("@") ); + } + + /* + * Validate::mac(); Tests + */ + public function testMac_random_valid11() + { + $this->assertTrue( Validate::mac("ce:bb:ac:22:9e:72") ); + } + public function testMac_random_valid12() + { + $this->assertTrue( Validate::mac("ce-bb-ac-22-9e-72") ); + } + public function testMac_random_valid13() + { + $this->assertTrue( Validate::mac("cebb.ac22.9e72") ); + } + public function testMac_random_valid21() + { + $this->assertTrue( Validate::mac("77:a8:7a:bf:45:6f") ); + } + public function testMac_random_valid22() + { + $this->assertTrue( Validate::mac("77-a8-7a-bf-45-6f") ); + } + public function testMac_random_valid23() + { + $this->assertTrue( Validate::mac("77a8.7abf.456f") ); + } + public function testMac_invalid1() + { + $this->assertFalse( Validate::mac("58-E4-C8-C3-5G-23") ); + } + public function testMac_invalid2() + { + $this->assertFalse( Validate::mac("58-E4-C8-C3-5-23") ); + } + public function testMac_invalid3() + { + $this->assertFalse( Validate::mac("58-E4-C8-C3-23") ); + } + public function testMac_invalid4() + { + $this->assertFalse( Validate::mac("58-E4-C8-23") ); + } + public function testMac_empty() + { + $this->assertFalse( Validate::mac("") ); + } + public function testMac_trash1() + { + $this->assertFalse( Validate::mac("%") ); + } + public function testMac_trash2() + { + $this->assertFalse( Validate::mac("-") ); + } + public function testMac_trash3() + { + $this->assertFalse( Validate::mac(".") ); + } + public function testMac_trash4() + { + $this->assertFalse( Validate::mac(":") ); + } + + /* + * Validate::range(); Tests + */ + public function testRange_int1() { + $this->assertTrue( Validate::range(23, 20, 25) ); + } + public function testRange_int2() { + $this->assertTrue( Validate::range(0, -1, 3) ); + } + public function testRange_int3() { + $this->assertFalse( Validate::range(-50, -1, 3) ); + } + public function testRange_float1() { + $this->assertTrue( Validate::range(2.3, 2.0, 2.5) ); + } + public function testRange_float2() { + $this->assertTrue( Validate::range(0.0, -0.1, 0.3) ); + } + public function testRange_float3() { + $this->assertFalse( Validate::range(-5.0, -0.1, 0.3) ); + } + public function testRange_int_in_float1() { + $this->assertTrue( Validate::range(2, 1.9, 2.1) ); + } + public function testRange_int_in_float2() { + $this->assertTrue( Validate::range(0, -0.1, 0.3) ); + } + public function testRange_int_in_float3() { + $this->assertFalse( Validate::range(5, -0.1, 0.3) ); + } + public function testRange_float_in_int1() { + $this->assertTrue( Validate::range(2.1, 2, 3) ); + } + public function testRange_float_in_int2() { + $this->assertTrue( Validate::range(0.1, 0, 1) ); + } + public function testRange_float_in_int3() { + $this->assertFalse( Validate::range(-5.5, -5, 0) ); + } + + /* + * Validate::iban(); Tests + */ + + + /* + * Validate::swift(); Tests + */ + + +} diff --git a/tests/test.class.ValidateStatic.php b/tests/test.class.ValidateStatic.php deleted file mode 100644 index e960ed9..0000000 --- a/tests/test.class.ValidateStatic.php +++ /dev/null @@ -1,411 +0,0 @@ - - * Date: 14.05.2016 - * Time: 11:25 - */ -class ValidateStaticTest extends TestCase -{ - /* - * ValidateStatic::email(); Tests - */ - public function testEmail_myEmail_level1() - { - $result = ValidateStatic::email("confu5ed@serious-pro.de"); - $this->assertTrue($result); - } - public function testEmail_myEmail_level2() - { - $result = ValidateStatic::email("confu5ed@serious-pro.de", 2); - $this->assertTrue($result); - } - public function testEmail_myEmail_level1_whitelisted() - { - $result = ValidateStatic::email("confu5ed@serious-pro.de", 1,["whitelist"=>["confu5ed@serious-pro.de"]]); - $this->assertTrue($result); - } - public function testEmail_myEmail_level1_not_in_whitelist() - { - $result = ValidateStatic::email("confu5ed@serious-pro.de", 1,["whitelist"=>["confu5ed@serious-pro.eu"]]); - $this->assertTrue($result); - } - public function testEmail_myEmail_level1_blacklisted() - { - $result = ValidateStatic::email("confu5ed@serious-pro.de",1,["blacklist"=>["confu5ed@serious-pro.de"]]); - $this->assertFalse($result); - } - public function testEmail_myEmail_level1_not_in_blacklist() - { - $result = ValidateStatic::email("confu5ed@serious-pro.de", 1,["blacklist"=>["confu5ed@serious-pro.eu"]]); - $this->assertTrue($result); - } - public function testEmail_myEmail_level2_whitelisted() - { - $result = ValidateStatic::email("confu5ed@serious-pro.de", 2,["whitelist"=>["confu5ed@serious-pro.de"]]); - $this->assertTrue($result); - } - public function testEmail_myEmail_level2_not_in_whitelist() - { - $result = ValidateStatic::email("confu5ed@serious-pro.de", 2,["whitelist"=>["confu5ed@serious-pro.eu"]]); - $this->assertTrue($result); - } - public function testEmail_myEmail_level2_blacklisted() - { - $result = ValidateStatic::email("confu5ed@serious-pro.de", 2,["blacklist"=>["confu5ed@serious-pro.de"]]); - $this->assertFalse($result); - } - public function testEmail_myEmail_level2_not_in_blacklist() - { - $result = ValidateStatic::email("confu5ed@serious-pro.de", 2,["blacklist"=>["confu5ed@serious-pro.eu"]]); - $this->assertTrue($result); - } - public function testEmail_random1_level1() - { - $result = ValidateStatic::email("tempus.lorem.fringilla@vitae.co.uk"); - $this->assertTrue($result); - } - public function testEmail_random2_level1() - { - $result = ValidateStatic::email("Etiam.ligula@et.com"); - $this->assertTrue($result); - } - public function testEmail_random3_level1() - { - $result = ValidateStatic::email("orci.tincidunt.adipiscing@famesacturpis.edu"); - $this->assertTrue($result); - } - public function testEmail_random4_level1() - { - $result = ValidateStatic::email("_______@example.com"); - $this->assertTrue($result); - } - public function testEmail_random5_level1() - { - $result = ValidateStatic::email("nonummy.Fusce.fermentum@ut.org"); - $this->assertTrue($result); - } - public function testEmail_random6_level1() - { - $result = ValidateStatic::email('"email"@example.com'); - $this->assertTrue($result); - } - public function testEmail_random7_level1() - { - $result = ValidateStatic::email('much."more\ unusual"@example.com'); - $this->assertTrue($result); - } - public function testEmail_random8_level1() - { - $result = ValidateStatic::email('very.unusual."@".unusual.com@example.com'); - $this->assertTrue($result); - } - public function testEmail_random9_level1() - { - $result = ValidateStatic::email('very."(),:;<>[]".VERY."very@\\"very".unusual@strange.example.com'); - $this->assertTrue($result); - } - public function testEmail_random10_level2() - { - $result = ValidateStatic::email('very."(),:;<>[]".VERY."very@\\"very".unusual@serious-pro.de', 2); - $this->assertTrue($result); - } - public function testEmail_invalid1_level1() - { - $result = ValidateStatic::email("me@me@serious-pro.de"); - $this->assertFalse($result); - } - public function testEmail_invalid2_level1() - { - $result = ValidateStatic::email("me me@serious-pro.de"); - $this->assertFalse($result); - } - public function testEmail_invalid3_level1() - { - $result = ValidateStatic::email("me@serious pro.de"); - $this->assertFalse($result); - } - - /* - * ValidateStatic::ipv4(); Tests - */ - public function testIPv4_v4_localhost() - { - $this->assertTrue( ValidateStatic::ipv4("127.0.0.1") ); - } - public function testIPv4_v4_network() - { - $this->assertTrue( ValidateStatic::ipv4("192.168.178.1") ); - } - public function testIPv4_v4_googledns1() - { - $this->assertTrue( ValidateStatic::ipv4("8.8.8.8") ); - } - public function testIPv4_v4_googledns2() - { - $this->assertTrue( ValidateStatic::ipv4("8.8.4.4") ); - } - public function testIPv4_v4_mask() - { - $this->assertTrue( ValidateStatic::ipv4("255.255.255.255") ); - } - public function testIPv4_v4_zero() - { - $this->assertTrue( ValidateStatic::ipv4("0.0.0.0") ); - } - public function testIPv4_v4_tomuch() - { - $this->assertFalse( ValidateStatic::ipv4("256.255.255.255") ); - } - public function testIPv4_domain() - { - $this->assertFalse( ValidateStatic::ipv4("serious-pro.de") ); - } - public function testIPv4_v6_localhost() - { - $this->assertFalse( ValidateStatic::ipv4("::1") ); - } - public function testIPv4_v6_googledns1() - { - $this->assertFalse( ValidateStatic::ipv4("2001:4860:4860::8888") ); - } - public function testIPv4_v6_googledns2() - { - $this->assertFalse( ValidateStatic::ipv4("2001:4860:4860::8844") ); - } - - /* - * ValidateStatic::ipv6(); Tests - */ - public function testIPv6_v4_localhost() - { - $this->assertFalse( ValidateStatic::ipv6("127.0.0.1") ); - } - public function testIPv6_v4_network() - { - $this->assertFalse( ValidateStatic::ipv6("192.168.178.1") ); - } - public function testIPv6_v4_googledns1() - { - $this->assertFalse( ValidateStatic::ipv6("8.8.8.8") ); - } - public function testIPv6_v4_googledns2() - { - $this->assertFalse( ValidateStatic::ipv6("8.8.4.4") ); - } - public function testIPv6_v4_mask() - { - $this->assertFalse( ValidateStatic::ipv6("255.255.255.255") ); - } - public function testIPv6_v4_zero() - { - $this->assertFalse( ValidateStatic::ipv6("0.0.0.0") ); - } - public function testIPv6_v4_tomuch() - { - $this->assertFalse( ValidateStatic::ipv6("256.255.255.255") ); - } - public function testIPv6_domain() - { - $this->assertFalse( ValidateStatic::ipv6("serious-pro.de") ); - } - public function testIPv6_v6_localhost() - { - $this->assertTrue( ValidateStatic::ipv6("::1") ); - } - public function testIPv6_v6_googledns1() - { - $this->assertTrue( ValidateStatic::ipv6("2001:4860:4860::8888") ); - } - public function testIPv6_v6_googledns2() - { - $this->assertTrue( ValidateStatic::ipv6("2001:4860:4860::8844") ); - } - - /* - * ValidateStatic::ip(); Tests - */ - public function testIP_v4_localhost() - { - $this->assertTrue( ValidateStatic::ip("127.0.0.1") ); - } - public function testIP_v4_network() - { - $this->assertTrue( ValidateStatic::ip("192.168.178.1") ); - } - public function testIP_v4_googledns1() - { - $this->assertTrue( ValidateStatic::ip("8.8.8.8") ); - } - public function testIP_v4_googledns2() - { - $this->assertTrue( ValidateStatic::ip("8.8.4.4") ); - } - public function testIP_v4_mask() - { - $this->assertTrue( ValidateStatic::ip("255.255.255.255") ); - } - public function testIP_v4_zero() - { - $this->assertTrue( ValidateStatic::ip("0.0.0.0") ); - } - public function testIP_v4_tomuch() - { - $this->assertFalse( ValidateStatic::ip("256.255.255.255") ); - } - public function testIP_domain() - { - $this->assertFalse( ValidateStatic::ip("serious-pro.de") ); - } - public function testIP_v6_localhost() - { - $this->assertTrue( ValidateStatic::ip("::1") ); - } - public function testIP_v6_googledns1() - { - $this->assertTrue( ValidateStatic::ip("2001:4860:4860::8888") ); - } - public function testIP_v6_googledns2() - { - $this->assertTrue( ValidateStatic::ip("2001:4860:4860::8844") ); - } - public function testIP_empty() - { - $this->assertFalse( ValidateStatic::ip("") ); - } - public function testIP_trash1() - { - $this->assertFalse( ValidateStatic::ip("%") ); - } - public function testIP_trash2() - { - $this->assertFalse( ValidateStatic::ip("~") ); - } - public function testIP_trash3() - { - $this->assertFalse( ValidateStatic::ip("@") ); - } - - /* - * ValidateStatic::mac(); Tests - */ - public function testMac_random_valid11() - { - $this->assertTrue( ValidateStatic::mac("ce:bb:ac:22:9e:72") ); - } - public function testMac_random_valid12() - { - $this->assertTrue( ValidateStatic::mac("ce-bb-ac-22-9e-72") ); - } - public function testMac_random_valid13() - { - $this->assertTrue( ValidateStatic::mac("cebb.ac22.9e72") ); - } - public function testMac_random_valid21() - { - $this->assertTrue( ValidateStatic::mac("77:a8:7a:bf:45:6f") ); - } - public function testMac_random_valid22() - { - $this->assertTrue( ValidateStatic::mac("77-a8-7a-bf-45-6f") ); - } - public function testMac_random_valid23() - { - $this->assertTrue( ValidateStatic::mac("77a8.7abf.456f") ); - } - public function testMac_invalid1() - { - $this->assertFalse( ValidateStatic::mac("58-E4-C8-C3-5G-23") ); - } - public function testMac_invalid2() - { - $this->assertFalse( ValidateStatic::mac("58-E4-C8-C3-5-23") ); - } - public function testMac_invalid3() - { - $this->assertFalse( ValidateStatic::mac("58-E4-C8-C3-23") ); - } - public function testMac_invalid4() - { - $this->assertFalse( ValidateStatic::mac("58-E4-C8-23") ); - } - public function testMac_empty() - { - $this->assertFalse( ValidateStatic::mac("") ); - } - public function testMac_trash1() - { - $this->assertFalse( ValidateStatic::mac("%") ); - } - public function testMac_trash2() - { - $this->assertFalse( ValidateStatic::mac("-") ); - } - public function testMac_trash3() - { - $this->assertFalse( ValidateStatic::mac(".") ); - } - public function testMac_trash4() - { - $this->assertFalse( ValidateStatic::mac(":") ); - } - - /* - * ValidateStatic::range(); Tests - */ - public function testRange_int1() { - $this->assertTrue( ValidateStatic::range(23, 20, 25) ); - } - public function testRange_int2() { - $this->assertTrue( ValidateStatic::range(0, -1, 3) ); - } - public function testRange_int3() { - $this->assertFalse( ValidateStatic::range(-50, -1, 3) ); - } - public function testRange_float1() { - $this->assertTrue( ValidateStatic::range(2.3, 2.0, 2.5) ); - } - public function testRange_float2() { - $this->assertTrue( ValidateStatic::range(0.0, -0.1, 0.3) ); - } - public function testRange_float3() { - $this->assertFalse( ValidateStatic::range(-5.0, -0.1, 0.3) ); - } - public function testRange_int_in_float1() { - $this->assertTrue( ValidateStatic::range(2, 1.9, 2.1) ); - } - public function testRange_int_in_float2() { - $this->assertTrue( ValidateStatic::range(0, -0.1, 0.3) ); - } - public function testRange_int_in_float3() { - $this->assertFalse( ValidateStatic::range(5, -0.1, 0.3) ); - } - public function testRange_float_in_int1() { - $this->assertTrue( ValidateStatic::range(2.1, 2, 3) ); - } - public function testRange_float_in_int2() { - $this->assertTrue( ValidateStatic::range(0.1, 0, 1) ); - } - public function testRange_float_in_int3() { - $this->assertFalse( ValidateStatic::range(-5.5, -5, 0) ); - } - - /* - * ValidateStatic::iban(); Tests - */ - - - /* - * ValidateStatic::swift(); Tests - */ - - -}