Upgrade PHPUnit to v8
This commit is contained in:
parent
e4cc02dc8a
commit
645bcf227c
|
|
@ -1,6 +1,7 @@
|
|||
language: php
|
||||
php:
|
||||
- "7.1"
|
||||
- "7.2"
|
||||
- "7.3"
|
||||
|
||||
before_script:
|
||||
- composer selfupdate
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "wellrested/wellrested",
|
||||
"description": "Simple PHP Library for RESTful APIs",
|
||||
"keywords": ["rest", "restful", "api", "http", "psr7", "psr-7"],
|
||||
"keywords": ["rest", "restful", "api", "http", "psr7", "psr-7", "psr15", "psr-15"],
|
||||
"homepage": "https://www.wellrested.org",
|
||||
"license": "MIT",
|
||||
"type": "library",
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
"psr/http-server-middleware": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^7"
|
||||
"phpunit/phpunit": "^8"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "d2595b7145f9ead3d0bb778b41d664cc",
|
||||
"content-hash": "29344ee99e0ff32d5d20fa62c0278512",
|
||||
"packages": [
|
||||
{
|
||||
"name": "psr/http-message",
|
||||
|
|
@ -58,16 +58,16 @@
|
|||
},
|
||||
{
|
||||
"name": "psr/http-server-handler",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/http-server-handler.git",
|
||||
"reference": "439d92054dc06097f2406ec074a2627839955a02"
|
||||
"reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/439d92054dc06097f2406ec074a2627839955a02",
|
||||
"reference": "439d92054dc06097f2406ec074a2627839955a02",
|
||||
"url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/aff2f80e33b7f026ec96bb42f63242dc50ffcae7",
|
||||
"reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -107,20 +107,20 @@
|
|||
"response",
|
||||
"server"
|
||||
],
|
||||
"time": "2018-01-22T17:04:15+00:00"
|
||||
"time": "2018-10-30T16:46:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-server-middleware",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/http-server-middleware.git",
|
||||
"reference": "ea17eb1fb2c8df6db919cc578451a8013c6a0ae5"
|
||||
"reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/ea17eb1fb2c8df6db919cc578451a8013c6a0ae5",
|
||||
"reference": "ea17eb1fb2c8df6db919cc578451a8013c6a0ae5",
|
||||
"url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/2296f45510945530b9dceb8bcedb5cb84d40c5f5",
|
||||
"reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -160,33 +160,35 @@
|
|||
"request",
|
||||
"response"
|
||||
],
|
||||
"time": "2018-01-22T17:08:31+00:00"
|
||||
"time": "2018-10-30T17:12:04+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "doctrine/instantiator",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/instantiator.git",
|
||||
"reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda"
|
||||
"reference": "a2c590166b2133a4633738648b6b064edae0814a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda",
|
||||
"reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda",
|
||||
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a",
|
||||
"reference": "a2c590166b2133a4633738648b6b064edae0814a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"athletic/athletic": "~0.1.8",
|
||||
"doctrine/coding-standard": "^6.0",
|
||||
"ext-pdo": "*",
|
||||
"ext-phar": "*",
|
||||
"phpunit/phpunit": "^6.2.3",
|
||||
"squizlabs/php_codesniffer": "^3.0.2"
|
||||
"phpbench/phpbench": "^0.13",
|
||||
"phpstan/phpstan-phpunit": "^0.11",
|
||||
"phpstan/phpstan-shim": "^0.11",
|
||||
"phpunit/phpunit": "^7.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
|
|
@ -211,25 +213,25 @@
|
|||
}
|
||||
],
|
||||
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
|
||||
"homepage": "https://github.com/doctrine/instantiator",
|
||||
"homepage": "https://www.doctrine-project.org/projects/instantiator.html",
|
||||
"keywords": [
|
||||
"constructor",
|
||||
"instantiate"
|
||||
],
|
||||
"time": "2017-07-22T11:58:36+00:00"
|
||||
"time": "2019-03-17T17:37:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "myclabs/deep-copy",
|
||||
"version": "1.8.1",
|
||||
"version": "1.9.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/myclabs/DeepCopy.git",
|
||||
"reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8"
|
||||
"reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8",
|
||||
"reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8",
|
||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72",
|
||||
"reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -264,26 +266,26 @@
|
|||
"object",
|
||||
"object graph"
|
||||
],
|
||||
"time": "2018-06-11T23:09:50+00:00"
|
||||
"time": "2019-04-07T13:18:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phar-io/manifest",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phar-io/manifest.git",
|
||||
"reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0"
|
||||
"reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0",
|
||||
"reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0",
|
||||
"url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4",
|
||||
"reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
"ext-phar": "*",
|
||||
"phar-io/version": "^1.0.1",
|
||||
"phar-io/version": "^2.0",
|
||||
"php": "^5.6 || ^7.0"
|
||||
},
|
||||
"type": "library",
|
||||
|
|
@ -319,20 +321,20 @@
|
|||
}
|
||||
],
|
||||
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
|
||||
"time": "2017-03-05T18:14:27+00:00"
|
||||
"time": "2018-07-08T19:23:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phar-io/version",
|
||||
"version": "1.0.1",
|
||||
"version": "2.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phar-io/version.git",
|
||||
"reference": "a70c0ced4be299a63d32fa96d9281d03e94041df"
|
||||
"reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df",
|
||||
"reference": "a70c0ced4be299a63d32fa96d9281d03e94041df",
|
||||
"url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6",
|
||||
"reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -366,7 +368,7 @@
|
|||
}
|
||||
],
|
||||
"description": "Library for handling version information and constraints",
|
||||
"time": "2017-03-05T17:38:23+00:00"
|
||||
"time": "2018-07-08T19:19:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-common",
|
||||
|
|
@ -424,16 +426,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-docblock",
|
||||
"version": "4.3.0",
|
||||
"version": "4.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
||||
"reference": "94fd0001232e47129dd3504189fa1c7225010d08"
|
||||
"reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08",
|
||||
"reference": "94fd0001232e47129dd3504189fa1c7225010d08",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c",
|
||||
"reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -471,7 +473,7 @@
|
|||
}
|
||||
],
|
||||
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
||||
"time": "2017-11-30T07:14:17+00:00"
|
||||
"time": "2019-04-30T17:48:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/type-resolver",
|
||||
|
|
@ -522,16 +524,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
"version": "1.7.6",
|
||||
"version": "1.8.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpspec/prophecy.git",
|
||||
"reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712"
|
||||
"reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712",
|
||||
"reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76",
|
||||
"reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -543,17 +545,17 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"phpspec/phpspec": "^2.5|^3.2",
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5"
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.7.x-dev"
|
||||
"dev-master": "1.8.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Prophecy\\": "src/"
|
||||
"psr-4": {
|
||||
"Prophecy\\": "src/Prophecy"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
|
|
@ -581,44 +583,44 @@
|
|||
"spy",
|
||||
"stub"
|
||||
],
|
||||
"time": "2018-04-18T13:57:24+00:00"
|
||||
"time": "2019-06-13T12:50:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
"version": "6.0.7",
|
||||
"version": "7.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "865662550c384bc1db7e51d29aeda1c2c161d69a"
|
||||
"reference": "aed67b57d459dcab93e84a5c9703d3deb5025dff"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/865662550c384bc1db7e51d29aeda1c2c161d69a",
|
||||
"reference": "865662550c384bc1db7e51d29aeda1c2c161d69a",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aed67b57d459dcab93e84a5c9703d3deb5025dff",
|
||||
"reference": "aed67b57d459dcab93e84a5c9703d3deb5025dff",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
"ext-xmlwriter": "*",
|
||||
"php": "^7.1",
|
||||
"phpunit/php-file-iterator": "^2.0",
|
||||
"php": "^7.2",
|
||||
"phpunit/php-file-iterator": "^2.0.2",
|
||||
"phpunit/php-text-template": "^1.2.1",
|
||||
"phpunit/php-token-stream": "^3.0",
|
||||
"phpunit/php-token-stream": "^3.0.1",
|
||||
"sebastian/code-unit-reverse-lookup": "^1.0.1",
|
||||
"sebastian/environment": "^3.1",
|
||||
"sebastian/environment": "^4.1",
|
||||
"sebastian/version": "^2.0.1",
|
||||
"theseer/tokenizer": "^1.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^7.0"
|
||||
"phpunit/phpunit": "^8.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-xdebug": "^2.6.0"
|
||||
"ext-xdebug": "^2.6.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "6.0-dev"
|
||||
"dev-master": "7.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
|
@ -644,25 +646,28 @@
|
|||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2018-06-01T07:51:50+00:00"
|
||||
"time": "2019-06-06T12:28:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
||||
"reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c"
|
||||
"reference": "050bedf145a257b1ff02746c31894800e5122946"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cecbc684605bb0cc288828eb5d65d93d5c676d3c",
|
||||
"reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946",
|
||||
"reference": "050bedf145a257b1ff02746c31894800e5122946",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^7.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
|
@ -691,7 +696,7 @@
|
|||
"filesystem",
|
||||
"iterator"
|
||||
],
|
||||
"time": "2018-06-11T11:44:00+00:00"
|
||||
"time": "2018-09-13T20:33:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-text-template",
|
||||
|
|
@ -736,16 +741,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpunit/php-timer",
|
||||
"version": "2.0.0",
|
||||
"version": "2.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-timer.git",
|
||||
"reference": "8b8454ea6958c3dee38453d3bd571e023108c91f"
|
||||
"reference": "1038454804406b0b5f5f520358e78c1c2f71501e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f",
|
||||
"reference": "8b8454ea6958c3dee38453d3bd571e023108c91f",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e",
|
||||
"reference": "1038454804406b0b5f5f520358e78c1c2f71501e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -757,7 +762,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0-dev"
|
||||
"dev-master": "2.1-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
|
@ -781,20 +786,20 @@
|
|||
"keywords": [
|
||||
"timer"
|
||||
],
|
||||
"time": "2018-02-01T13:07:23+00:00"
|
||||
"time": "2019-06-07T04:22:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-token-stream",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
|
||||
"reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace"
|
||||
"reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/21ad88bbba7c3d93530d93994e0a33cd45f02ace",
|
||||
"reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/c99e3be9d3e85f60646f152f9002d46ed7770d18",
|
||||
"reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -830,57 +835,56 @@
|
|||
"keywords": [
|
||||
"tokenizer"
|
||||
],
|
||||
"time": "2018-02-01T13:16:43+00:00"
|
||||
"time": "2018-10-30T05:52:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "7.2.4",
|
||||
"version": "8.2.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "00bc0b93f0ff4f557e9ea766557fde96da9a03dd"
|
||||
"reference": "24b6cfcec34c1167ee1d90b7cb22bee324af319f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/00bc0b93f0ff4f557e9ea766557fde96da9a03dd",
|
||||
"reference": "00bc0b93f0ff4f557e9ea766557fde96da9a03dd",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/24b6cfcec34c1167ee1d90b7cb22bee324af319f",
|
||||
"reference": "24b6cfcec34c1167ee1d90b7cb22bee324af319f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/instantiator": "^1.1",
|
||||
"doctrine/instantiator": "^1.2.0",
|
||||
"ext-dom": "*",
|
||||
"ext-json": "*",
|
||||
"ext-libxml": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-xml": "*",
|
||||
"myclabs/deep-copy": "^1.7",
|
||||
"phar-io/manifest": "^1.0.1",
|
||||
"phar-io/version": "^1.0",
|
||||
"php": "^7.1",
|
||||
"phpspec/prophecy": "^1.7",
|
||||
"phpunit/php-code-coverage": "^6.0.7",
|
||||
"phpunit/php-file-iterator": "^2.0",
|
||||
"ext-xmlwriter": "*",
|
||||
"myclabs/deep-copy": "^1.9.1",
|
||||
"phar-io/manifest": "^1.0.3",
|
||||
"phar-io/version": "^2.0.1",
|
||||
"php": "^7.2",
|
||||
"phpspec/prophecy": "^1.8.1",
|
||||
"phpunit/php-code-coverage": "^7.0.5",
|
||||
"phpunit/php-file-iterator": "^2.0.2",
|
||||
"phpunit/php-text-template": "^1.2.1",
|
||||
"phpunit/php-timer": "^2.0",
|
||||
"sebastian/comparator": "^3.0",
|
||||
"sebastian/diff": "^3.0",
|
||||
"sebastian/environment": "^3.1",
|
||||
"sebastian/exporter": "^3.1",
|
||||
"sebastian/global-state": "^2.0",
|
||||
"phpunit/php-timer": "^2.1.2",
|
||||
"sebastian/comparator": "^3.0.2",
|
||||
"sebastian/diff": "^3.0.2",
|
||||
"sebastian/environment": "^4.2.2",
|
||||
"sebastian/exporter": "^3.1.0",
|
||||
"sebastian/global-state": "^3.0.0",
|
||||
"sebastian/object-enumerator": "^3.0.3",
|
||||
"sebastian/resource-operations": "^1.0",
|
||||
"sebastian/resource-operations": "^2.0.1",
|
||||
"sebastian/type": "^1.1.0",
|
||||
"sebastian/version": "^2.0.1"
|
||||
},
|
||||
"conflict": {
|
||||
"phpunit/phpunit-mock-objects": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-pdo": "*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-soap": "*",
|
||||
"ext-xdebug": "*",
|
||||
"phpunit/php-invoker": "^2.0"
|
||||
"phpunit/php-invoker": "^2.0.0"
|
||||
},
|
||||
"bin": [
|
||||
"phpunit"
|
||||
|
|
@ -888,7 +892,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "7.2-dev"
|
||||
"dev-master": "8.2-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
|
@ -914,7 +918,7 @@
|
|||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2018-06-05T03:40:05+00:00"
|
||||
"time": "2019-06-15T07:25:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/code-unit-reverse-lookup",
|
||||
|
|
@ -963,16 +967,16 @@
|
|||
},
|
||||
{
|
||||
"name": "sebastian/comparator",
|
||||
"version": "3.0.1",
|
||||
"version": "3.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/comparator.git",
|
||||
"reference": "591a30922f54656695e59b1f39501aec513403da"
|
||||
"reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/591a30922f54656695e59b1f39501aec513403da",
|
||||
"reference": "591a30922f54656695e59b1f39501aec513403da",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da",
|
||||
"reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -1023,27 +1027,27 @@
|
|||
"compare",
|
||||
"equality"
|
||||
],
|
||||
"time": "2018-06-14T15:05:28+00:00"
|
||||
"time": "2018-07-12T15:12:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/diff",
|
||||
"version": "3.0.1",
|
||||
"version": "3.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/diff.git",
|
||||
"reference": "366541b989927187c4ca70490a35615d3fef2dce"
|
||||
"reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/366541b989927187c4ca70490a35615d3fef2dce",
|
||||
"reference": "366541b989927187c4ca70490a35615d3fef2dce",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
|
||||
"reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^7.0",
|
||||
"phpunit/phpunit": "^7.5 || ^8.0",
|
||||
"symfony/process": "^2 || ^3.3 || ^4"
|
||||
},
|
||||
"type": "library",
|
||||
|
|
@ -1079,32 +1083,35 @@
|
|||
"unidiff",
|
||||
"unified diff"
|
||||
],
|
||||
"time": "2018-06-10T07:54:39+00:00"
|
||||
"time": "2019-02-04T06:01:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/environment",
|
||||
"version": "3.1.0",
|
||||
"version": "4.2.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/environment.git",
|
||||
"reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5"
|
||||
"reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
|
||||
"reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/f2a2c8e1c97c11ace607a7a667d73d47c19fe404",
|
||||
"reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.0"
|
||||
"php": "^7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^6.1"
|
||||
"phpunit/phpunit": "^7.5"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-posix": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.1.x-dev"
|
||||
"dev-master": "4.2-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
|
@ -1129,7 +1136,7 @@
|
|||
"environment",
|
||||
"hhvm"
|
||||
],
|
||||
"time": "2017-07-01T08:51:00+00:00"
|
||||
"time": "2019-05-05T09:05:15+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/exporter",
|
||||
|
|
@ -1200,23 +1207,26 @@
|
|||
},
|
||||
{
|
||||
"name": "sebastian/global-state",
|
||||
"version": "2.0.0",
|
||||
"version": "3.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/global-state.git",
|
||||
"reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4"
|
||||
"reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
|
||||
"reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4",
|
||||
"reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.0"
|
||||
"php": "^7.2",
|
||||
"sebastian/object-reflector": "^1.1.1",
|
||||
"sebastian/recursion-context": "^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^6.0"
|
||||
"ext-dom": "*",
|
||||
"phpunit/phpunit": "^8.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-uopz": "*"
|
||||
|
|
@ -1224,7 +1234,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
|
@ -1247,7 +1257,7 @@
|
|||
"keywords": [
|
||||
"global state"
|
||||
],
|
||||
"time": "2017-04-27T15:39:26+00:00"
|
||||
"time": "2019-02-01T05:30:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/object-enumerator",
|
||||
|
|
@ -1396,25 +1406,25 @@
|
|||
},
|
||||
{
|
||||
"name": "sebastian/resource-operations",
|
||||
"version": "1.0.0",
|
||||
"version": "2.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/resource-operations.git",
|
||||
"reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
|
||||
"reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
|
||||
"reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9",
|
||||
"reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.6.0"
|
||||
"php": "^7.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
"dev-master": "2.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
|
@ -1434,7 +1444,53 @@
|
|||
],
|
||||
"description": "Provides a list of PHP built-in functions that operate on resources",
|
||||
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
|
||||
"time": "2015-07-28T20:34:47+00:00"
|
||||
"time": "2018-10-04T04:07:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/type",
|
||||
"version": "1.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/type.git",
|
||||
"reference": "b2a7f9aac51ce18cd7ac8b31e37c8ce5646fc741"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b2a7f9aac51ce18cd7ac8b31e37c8ce5646fc741",
|
||||
"reference": "b2a7f9aac51ce18cd7ac8b31e37c8ce5646fc741",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.2"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.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": "Collection of value objects that represent the types of the PHP type system",
|
||||
"homepage": "https://github.com/sebastianbergmann/type",
|
||||
"time": "2019-06-08T04:53:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/version",
|
||||
|
|
@ -1480,17 +1536,75 @@
|
|||
"time": "2016-10-03T07:35:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "theseer/tokenizer",
|
||||
"version": "1.1.0",
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.11.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/theseer/tokenizer.git",
|
||||
"reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b"
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
"reference": "82ebae02209c21113908c229e9883c419720738a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b",
|
||||
"reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a",
|
||||
"reference": "82ebae02209c21113908c229e9883c419720738a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-ctype": "For best performance"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.11-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Ctype\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
},
|
||||
{
|
||||
"name": "Gert de Pagter",
|
||||
"email": "BackEndTea@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for ctype functions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"ctype",
|
||||
"polyfill",
|
||||
"portable"
|
||||
],
|
||||
"time": "2019-02-06T07:57:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "theseer/tokenizer",
|
||||
"version": "1.1.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/theseer/tokenizer.git",
|
||||
"reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
|
||||
"reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -1517,24 +1631,25 @@
|
|||
}
|
||||
],
|
||||
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
|
||||
"time": "2017-04-07T12:08:54+00:00"
|
||||
"time": "2019-06-13T22:48:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
"version": "1.3.0",
|
||||
"version": "1.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/webmozart/assert.git",
|
||||
"reference": "0df1908962e7a3071564e857d86874dad1ef204a"
|
||||
"reference": "83e253c8e0be5b0257b881e1827274667c5c17a9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a",
|
||||
"reference": "0df1908962e7a3071564e857d86874dad1ef204a",
|
||||
"url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9",
|
||||
"reference": "83e253c8e0be5b0257b881e1827274667c5c17a9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.3 || ^7.0"
|
||||
"php": "^5.3.3 || ^7.0",
|
||||
"symfony/polyfill-ctype": "^1.8"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.6",
|
||||
|
|
@ -1567,7 +1682,7 @@
|
|||
"check",
|
||||
"validate"
|
||||
],
|
||||
"time": "2018-01-29T19:49:41+00:00"
|
||||
"time": "2018-12-25T11:19:39+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class RoutingTest extends TestCase
|
|||
/** @var ResponseInterface */
|
||||
private $response;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class DispatchStackTest extends TestCase
|
|||
private $response;
|
||||
private $next;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->request = new ServerRequest();
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ use Psr\Http\Message\ResponseInterface;
|
|||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Server\RequestHandlerInterface;
|
||||
use WellRESTed\Dispatching\Dispatcher;
|
||||
use WellRESTed\Dispatching\DispatchException;
|
||||
use WellRESTed\Message\Response;
|
||||
use WellRESTed\Message\ServerRequest;
|
||||
use WellRESTed\MiddlewareInterface;
|
||||
|
|
@ -23,7 +24,7 @@ class DispatcherTest extends TestCase
|
|||
/** @var ResponseInterface */
|
||||
private $stubResponse;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->request = new ServerRequest();
|
||||
$this->response = new Response();
|
||||
|
|
@ -150,9 +151,9 @@ class DispatcherTest extends TestCase
|
|||
$this->assertEquals(200, $response->getStatusCode());
|
||||
}
|
||||
|
||||
/** @expectedException \WellRESTed\Dispatching\DispatchException */
|
||||
public function testThrowsExceptionWhenUnableToDispatch()
|
||||
{
|
||||
$this->expectException(DispatchException::class);
|
||||
$this->dispatch(null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace WellRESTed\Test\Unit\Message;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use WellRESTed\Message\Message;
|
||||
use WellRESTed\Message\Response;
|
||||
use WellRESTed\Message\Stream;
|
||||
|
|
@ -12,7 +13,7 @@ class MessageTest extends TestCase
|
|||
/** @var Message */
|
||||
private $message;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->message = new Response();
|
||||
}
|
||||
|
|
@ -87,11 +88,11 @@ class MessageTest extends TestCase
|
|||
}
|
||||
|
||||
/**
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @dataProvider invalidHeaderProvider
|
||||
*/
|
||||
public function testWithHeaderThrowsExceptionWithInvalidArgument($name, $value)
|
||||
{
|
||||
$this->expectException(InvalidArgumentException::class);
|
||||
$message = (new Response())
|
||||
->withHeader($name, $value);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace WellRESTed\Test\Unit\Message;
|
||||
|
||||
use RuntimeException;
|
||||
use WellRESTed\Message\NullStream;
|
||||
use WellRESTed\Test\TestCase;
|
||||
|
||||
|
|
@ -50,16 +51,16 @@ class NullStreamTest extends TestCase
|
|||
$this->assertFalse($stream->isSeekable());
|
||||
}
|
||||
|
||||
/** @expectedException \RuntimeException */
|
||||
public function testSeekReturnsFalse()
|
||||
{
|
||||
$this->expectException(RuntimeException::class);
|
||||
$stream = new NullStream();
|
||||
$stream->seek(10);
|
||||
}
|
||||
|
||||
/** @expectedException \RuntimeException */
|
||||
public function testRewindThrowsException()
|
||||
{
|
||||
$this->expectException(RuntimeException::class);
|
||||
$stream = new NullStream();
|
||||
$stream->rewind();
|
||||
}
|
||||
|
|
@ -70,9 +71,9 @@ class NullStreamTest extends TestCase
|
|||
$this->assertFalse($stream->isWritable());
|
||||
}
|
||||
|
||||
/** @expectedException \RuntimeException */
|
||||
public function testWriteThrowsException()
|
||||
{
|
||||
$this->expectException(RuntimeException::class);
|
||||
$stream = new NullStream();
|
||||
$stream->write("");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace WellRESTed\Test\Unit\Message;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use WellRESTed\Message\NullStream;
|
||||
use WellRESTed\Message\Request;
|
||||
use WellRESTed\Message\Uri;
|
||||
|
|
@ -96,10 +97,10 @@ class RequestTest extends TestCase
|
|||
|
||||
/**
|
||||
* @dataProvider invalidMethodProvider
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testWithMethodThrowsExceptionOnInvalidMethod($method)
|
||||
{
|
||||
$this->expectException(InvalidArgumentException::class);
|
||||
$request = new Request();
|
||||
$request->withMethod($method);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace WellRESTed\Test\Unit\Message;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use WellRESTed\Message\NullStream;
|
||||
use WellRESTed\Message\ServerRequest;
|
||||
use WellRESTed\Message\UploadedFile;
|
||||
|
|
@ -458,11 +459,11 @@ class ServerRequestTest extends TestCase
|
|||
}
|
||||
|
||||
/**
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @dataProvider invalidUploadedFilesProvider
|
||||
*/
|
||||
public function testWithUploadedFilesThrowsExceptionWithInvalidTree($uploadedFiles)
|
||||
{
|
||||
$this->expectException(InvalidArgumentException::class);
|
||||
$request = new ServerRequest();
|
||||
$request->withUploadedFiles($uploadedFiles);
|
||||
}
|
||||
|
|
@ -552,11 +553,11 @@ class ServerRequestTest extends TestCase
|
|||
}
|
||||
|
||||
/**
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @dataProvider invalidParsedBodyProvider
|
||||
*/
|
||||
public function testWithParsedBodyThrowsExceptionWithInvalidType($body)
|
||||
{
|
||||
$this->expectException(InvalidArgumentException::class);
|
||||
$request = new ServerRequest();
|
||||
$request->withParsedBody($body);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace WellRESTed\Test\Unit\Message;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use RuntimeException;
|
||||
use WellRESTed\Message\Stream;
|
||||
use WellRESTed\Test\TestCase;
|
||||
|
||||
|
|
@ -10,13 +12,13 @@ class StreamTest extends TestCase
|
|||
private $resource;
|
||||
private $content = "Hello, world!";
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->resource = fopen("php://memory", "w+");
|
||||
fwrite($this->resource, $this->content);
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
if (is_resource($this->resource)) {
|
||||
fclose($this->resource);
|
||||
|
|
@ -36,11 +38,11 @@ class StreamTest extends TestCase
|
|||
}
|
||||
|
||||
/**
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @dataProvider invalidResourceProvider
|
||||
*/
|
||||
public function testThrowsExceptionWithInvalidResource($resource)
|
||||
{
|
||||
$this->expectException(InvalidArgumentException::class);
|
||||
new Stream($resource);
|
||||
}
|
||||
|
||||
|
|
@ -132,18 +134,18 @@ class StreamTest extends TestCase
|
|||
$this->assertEquals($this->content . $message, (string) $stream);
|
||||
}
|
||||
|
||||
/** @expectedException \RuntimeException */
|
||||
public function testThrowsExceptionOnErrorWriting()
|
||||
{
|
||||
$this->expectException(RuntimeException::class);
|
||||
$filename = tempnam(sys_get_temp_dir(), "php");
|
||||
$handle = fopen($filename, "r");
|
||||
$stream = new Stream($handle);
|
||||
$stream->write("Hello, world!");
|
||||
}
|
||||
|
||||
/** @expectedException \RuntimeException */
|
||||
public function testThrowsExceptionOnErrorReading()
|
||||
{
|
||||
$this->expectException(RuntimeException::class);
|
||||
$filename = tempnam(sys_get_temp_dir(), "php");
|
||||
$handle = fopen($filename, "w");
|
||||
$stream = new Stream($handle);
|
||||
|
|
@ -158,9 +160,9 @@ class StreamTest extends TestCase
|
|||
$this->assertEquals("world", $string);
|
||||
}
|
||||
|
||||
/** @expectedException \RuntimeException */
|
||||
public function testThrowsExceptionOnErrorReadingToEnd()
|
||||
{
|
||||
$this->expectException(RuntimeException::class);
|
||||
$filename = tempnam(sys_get_temp_dir(), "php");
|
||||
$handle = fopen($filename, "w");
|
||||
$stream = new Stream($handle);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
namespace WellRESTed\Test\Unit\Message;
|
||||
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
use RuntimeException;
|
||||
use WellRESTed\Message\UploadedFile;
|
||||
use WellRESTed\Message\UploadedFileState;
|
||||
use WellRESTed\Test\TestCase;
|
||||
|
|
@ -15,7 +16,7 @@ class UploadedFileTest extends TestCase
|
|||
private $tmpName;
|
||||
private $movePath;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
UploadedFileState::$php_sapi_name = "cli";
|
||||
|
|
@ -23,7 +24,7 @@ class UploadedFileTest extends TestCase
|
|||
$this->movePath = tempnam(sys_get_temp_dir(), "tst");
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
parent::tearDown();
|
||||
if (file_exists($this->tmpName)) {
|
||||
|
|
@ -58,9 +59,9 @@ class UploadedFileTest extends TestCase
|
|||
$this->assertTrue($file->getStream()->eof());
|
||||
}
|
||||
|
||||
/** @expectedException \RuntimeException */
|
||||
public function testGetStreamThrowsExceptionAfterMoveTo()
|
||||
{
|
||||
$this->expectException(RuntimeException::class);
|
||||
$content = "Hello, World!";
|
||||
file_put_contents($this->tmpName, $content);
|
||||
$file = new UploadedFile("", "", 0, $this->tmpName, "");
|
||||
|
|
@ -68,9 +69,9 @@ class UploadedFileTest extends TestCase
|
|||
$file->getStream();
|
||||
}
|
||||
|
||||
/** @expectedException \RuntimeException */
|
||||
public function testGetStreamThrowsExceptionForNonUploadedFile()
|
||||
{
|
||||
$this->expectException(RuntimeException::class);
|
||||
UploadedFileState::$php_sapi_name = "apache";
|
||||
UploadedFileState::$is_uploaded_file = false;
|
||||
$file = new UploadedFile("", "", 0, "", 0);
|
||||
|
|
@ -106,9 +107,10 @@ class UploadedFileTest extends TestCase
|
|||
$this->assertEquals($originalMd5, md5_file($this->movePath));
|
||||
}
|
||||
|
||||
/** @expectedException \RuntimeException */
|
||||
public function testMoveToThrowsExceptionOnSubsequentCall()
|
||||
{
|
||||
$this->expectException(RuntimeException::class);
|
||||
|
||||
$content = "Hello, World!";
|
||||
file_put_contents($this->tmpName, $content);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace WellRESTed\Test\Unit\Message;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use WellRESTed\Message\Uri;
|
||||
use WellRESTed\Test\TestCase;
|
||||
|
||||
|
|
@ -36,9 +37,9 @@ class UriTest extends TestCase
|
|||
];
|
||||
}
|
||||
|
||||
/** @expectedException \InvalidArgumentException */
|
||||
public function testInvalidSchemeThrowsException()
|
||||
{
|
||||
$this->expectException(InvalidArgumentException::class);
|
||||
$uri = new Uri();
|
||||
$uri->withScheme("gopher");
|
||||
}
|
||||
|
|
@ -224,11 +225,11 @@ class UriTest extends TestCase
|
|||
}
|
||||
|
||||
/**
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @dataProvider invalidHostProvider
|
||||
*/
|
||||
public function testInvalidHostThrowsException($host)
|
||||
{
|
||||
$this->expectException(InvalidArgumentException::class);
|
||||
$uri = new Uri();
|
||||
$uri->withHost($host);
|
||||
}
|
||||
|
|
@ -284,11 +285,11 @@ class UriTest extends TestCase
|
|||
}
|
||||
|
||||
/**
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @dataProvider invalidPortProvider
|
||||
*/
|
||||
public function testInvalidPortThrowsException($port)
|
||||
{
|
||||
$this->expectException(InvalidArgumentException::class);
|
||||
$uri = new Uri();
|
||||
$uri->withPort($port);
|
||||
}
|
||||
|
|
@ -378,11 +379,11 @@ class UriTest extends TestCase
|
|||
}
|
||||
|
||||
/**
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @dataProvider invalidPathProvider
|
||||
*/
|
||||
public function testInvalidPathThrowsException($path)
|
||||
{
|
||||
$this->expectException(InvalidArgumentException::class);
|
||||
$uri = new Uri();
|
||||
$uri->withPath($path);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class MethodMapTest extends TestCase
|
|||
private $next;
|
||||
private $middleware;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->request = new ServerRequest();
|
||||
$this->response = new Response();
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ namespace WellRESTed\Test\Unit\Routing\Route;
|
|||
|
||||
use PHPUnit\Framework\Error\Notice;
|
||||
use PHPUnit\Framework\Error\Warning;
|
||||
use RuntimeException;
|
||||
use WellRESTed\Routing\Route\MethodMap;
|
||||
use WellRESTed\Routing\Route\RegexRoute;
|
||||
use WellRESTed\Routing\Route\RouteInterface;
|
||||
|
|
@ -13,7 +14,7 @@ class RegexRouteTest extends TestCase
|
|||
{
|
||||
private $methodMap;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->methodMap = $this->prophesize(MethodMap::class);
|
||||
}
|
||||
|
|
@ -81,10 +82,10 @@ class RegexRouteTest extends TestCase
|
|||
|
||||
/**
|
||||
* @dataProvider invalidRouteProvider
|
||||
* @expectedException \RuntimeException
|
||||
*/
|
||||
public function testThrowsExceptionOnInvalidPattern($pattern)
|
||||
{
|
||||
$this->expectException(RuntimeException::class);
|
||||
$route = new RegexRoute($pattern, $this->methodMap->reveal());
|
||||
Warning::$enabled = false;
|
||||
Notice::$enabled = false;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class RouteFactoryTest extends TestCase
|
|||
{
|
||||
private $dispatcher;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->dispatcher = $this->prophesize(DispatcherInterface::class);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class RouteTest extends TestCase
|
|||
private $methodMap;
|
||||
private $route;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->methodMap = $this->prophesize(MethodMap::class);
|
||||
$this->methodMap->register(Argument::cetera())
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class TemplateRouteTest extends TestCase
|
|||
{
|
||||
private $methodMap;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->methodMap = $this->prophesize(MethodMap::class);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class RouterTest extends TestCase
|
|||
private $router;
|
||||
private $next;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class ServerTest extends TestCase
|
|||
/** @var Server */
|
||||
private $server;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class TransmitterTest extends TestCase
|
|||
private $response;
|
||||
private $body;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
HeaderStack::reset();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue