diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d004d8e --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ +# ---> VisualStudioCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +# ---> Composer +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +# composer.lock + diff --git a/ValidateTest.php b/ValidateTest.php deleted file mode 100644 index d21fbf7..0000000 --- a/ValidateTest.php +++ /dev/null @@ -1,405 +0,0 @@ - - * Date: 14.05.2016 - * Time: 11:25 - */ -class ValidateTest extends PHPUnit_Framework_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/composer.json b/composer.json new file mode 100644 index 0000000..a106bc3 --- /dev/null +++ b/composer.json @@ -0,0 +1,10 @@ +{ + "autoload": { + "classmap": [ + "src/" + ] + }, + "require-dev": { + "phpunit/phpunit": "^10" + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..498a802 --- /dev/null +++ b/composer.lock @@ -0,0 +1,1642 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "657b85759b97fae05fc2983bd4abadf7", + "packages": [], + "packages-dev": [ + { + "name": "myclabs/deep-copy", + "version": "1.11.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2023-03-08T13:26:56+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v5.0.2", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" + }, + "time": "2024-03-05T20:51:40+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "10.1.14", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/e3f51450ebffe8e0efdf7346ae966a656f7d5e5b", + "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-text-template": "^3.0", + "sebastian/code-unit-reverse-lookup": "^3.0", + "sebastian/complexity": "^3.0", + "sebastian/environment": "^6.0", + "sebastian/lines-of-code": "^2.0", + "sebastian/version": "^4.0", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^10.1" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "10.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.14" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-12T15:33:41+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "4.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-08-31T06:24:48+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^10.0" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:56:09+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-08-31T14:07:24+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "6.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:57:52+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "10.5.20", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "547d314dc24ec1e177720d45c6263fb226cc2ae3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/547d314dc24ec1e177720d45c6263fb226cc2ae3", + "reference": "547d314dc24ec1e177720d45c6263fb226cc2ae3", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.5", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-invoker": "^4.0", + "phpunit/php-text-template": "^3.0", + "phpunit/php-timer": "^6.0", + "sebastian/cli-parser": "^2.0", + "sebastian/code-unit": "^2.0", + "sebastian/comparator": "^5.0", + "sebastian/diff": "^5.0", + "sebastian/environment": "^6.0", + "sebastian/exporter": "^5.1", + "sebastian/global-state": "^6.0.1", + "sebastian/object-enumerator": "^5.0", + "sebastian/recursion-context": "^5.0", + "sebastian/type": "^4.0", + "sebastian/version": "^4.0" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "10.5-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.20" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2024-04-24T06:32:35+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T07:12:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:58:43+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:59:15+00:00" + }, + { + "name": "sebastian/comparator", + "version": "5.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2db5010a484d53ebf536087a70b4a5423c102372" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", + "reference": "2db5010a484d53ebf536087a70b4a5423c102372", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^10.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-08-14T13:18:12+00:00" + }, + { + "name": "sebastian/complexity", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "68ff824baeae169ec9f2137158ee529584553799" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", + "reference": "68ff824baeae169ec9f2137158ee529584553799", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-21T08:37:17+00:00" + }, + { + "name": "sebastian/diff", + "version": "5.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0", + "symfony/process": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T07:15:17+00:00" + }, + { + "name": "sebastian/environment", + "version": "6.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "https://github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-23T08:47:14+00:00" + }, + { + "name": "sebastian/exporter", + "version": "5.1.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "955288482d97c19a372d3f31006ab3f37da47adf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf", + "reference": "955288482d97c19a372d3f31006ab3f37da47adf", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T07:17:12+00:00" + }, + { + "name": "sebastian/global-state", + "version": "6.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T07:19:19+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-21T08:38:20+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "5.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:08:32+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:06:18+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "5.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:05:40+00:00" + }, + { + "name": "sebastian/type", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:10:45+00:00" + }, + { + "name": "sebastian/version", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-07T11:34:05+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:36:25+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.6.0" +} diff --git a/Validate.php b/src/class.ValidateStatic.php similarity index 98% rename from Validate.php rename to src/class.ValidateStatic.php index ccae15e..f6c5193 100644 --- a/Validate.php +++ b/src/class.ValidateStatic.php @@ -1,11 +1,14 @@ + * @author Marcel Naeve + * @package NAE\Validation */ -class Validate +class ValidateStatic { /** * Static method for validating email addresses with multiple secure levels and black- and whitelist. diff --git a/tests/test.class.ValidateStatic.php b/tests/test.class.ValidateStatic.php new file mode 100644 index 0000000..e960ed9 --- /dev/null +++ b/tests/test.class.ValidateStatic.php @@ -0,0 +1,411 @@ + + * 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 + */ + + +}