Skip to content

Commit 1138c88

Browse files
Merge branch 'martinssipenko-master'
2 parents ec48a02 + 71372ca commit 1138c88

19 files changed

+112
-149
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/build/
22
/composer.lock
33
/vendor/
4+
.phpunit.result.cache
45

56
/.idea/

.travis.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
language: php
22
sudo: false
33
php:
4+
- 7.3
45
- 7.2
5-
- 7.1
66
install:
7-
- composer install --prefer-dist
7+
- composer install --optimize-autoloader --prefer-dist --no-interaction
8+
before_script:
9+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
10+
- chmod +x ./cc-test-reporter
11+
- ./cc-test-reporter before-build
812
script:
913
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml
10-
after_success:
11-
- vendor/bin/test-reporter
14+
after_script:
15+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interfaces.
1111

1212
## Author and copyright
1313

14-
Martin Helmich <kontakt@martin-helmich.de>
14+
Martin Helmich <kontakt@martin-helmich.de>
1515
This library is [MIT-licensed](LICENSE.txt).
1616

1717
## Installation
@@ -24,11 +24,12 @@ There are several release branches of this library, each of these being compatib
2424
with different releases of PHPUnit and PHP. The following table should give an
2525
easy overview:
2626

27-
| PSR-7 assertion version | PHPUnit 4 | PHPUnit 5 | PHPUnit 6 | PHPUnit 7 |
28-
| ----------------------- | --------- | --------- | --------- | --------- |
29-
| v1 (branch `v1`), **unsupported** | :white_check_mark: | :white_check_mark: | :no_entry_sign: | :no_entry_sign: |
30-
| v2 (branch `v2`) | :no_entry_sign: | :no_entry_sign: | :white_check_mark: | :no_entry_sign: |
31-
| v3 (branch `master`) | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :white_check_mark: |
27+
| PSR-7 assertion version | PHPUnit 4 | PHPUnit 5 | PHPUnit 6 | PHPUnit 7 | PHPUnit 8 |
28+
| ----------------------- | --------- | --------- | --------- | --------- | --------- |
29+
| v1 (branch `v1`), **unsupported** | :white_check_mark: | :white_check_mark: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: |
30+
| v2 (branch `v2`) | :no_entry_sign: | :no_entry_sign: | :white_check_mark: | :no_entry_sign: | :no_entry_sign: |
31+
| v3 (branch `v3`) | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :white_check_mark: | :no_entry_sign: |
32+
| v4 (branch `master`) | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :white_check_mark: |
3233

3334
When you are using `composer require` and have already declared a dependency to
3435
`phpunit/phpunit` in your `composer.json` file, Composer should pick latest
@@ -204,7 +205,7 @@ The `$uriOrRequest` value may be
204205

205206
- a string, which will be interpreted as URI
206207
- an instance of the `Psr\Http\Message\UriInterface` interface
207-
- an instance of the `Psr\Http\Message\RequestInterface` interface
208+
- an instance of the `Psr\Http\Message\RequestInterface` interface
208209

209210
[composer-autoload]: https://getcomposer.org/doc/04-schema.md#autoload-dev
210211
[json-assert]: https://packagist.org/packages/helmich/phpunit-json-assert

composer.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@
99
}
1010
],
1111
"require": {
12-
"psr/http-message": "^1.0",
13-
"helmich/phpunit-json-assert": "^2.0",
14-
"php": ">=7.1"
12+
"php": "^7.1",
13+
"helmich/phpunit-json-assert": "^3.0",
14+
"psr/http-message": "^1.0"
1515
},
1616
"require-dev": {
1717
"guzzlehttp/psr7": "^1.2",
18-
"phpunit/phpunit": "^7.0",
19-
"codeclimate/php-test-reporter": "dev-master"
18+
"phpunit/phpunit": "^8.0"
2019
},
2120
"conflict": {
22-
"phpunit/phpunit": "<7.0 || >= 8.0"
21+
"phpunit/phpunit": "<8.0 || >= 9.0"
2322
},
2423
"autoload": {
2524
"psr-4": {
@@ -32,5 +31,8 @@
3231
"vendor/helmich/phpunit-json-assert/src/Functions.php",
3332
"src/Functions.php"
3433
]
34+
},
35+
"config": {
36+
"sort-packages": true
3537
}
3638
}

phpunit.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
convertErrorsToExceptions="true"
77
convertNoticesToExceptions="true"
88
convertWarningsToExceptions="true"
9-
mapTestClassNameToCoveredClassName="false"
109
timeoutForSmallTests="1"
1110
timeoutForMediumTests="10"
1211
timeoutForLargeTests="60">
@@ -21,11 +20,11 @@
2120
<logging>
2221
<log type="coverage-html" target="build/coverage" lowUpperBound="35"
2322
highLowerBound="70"/>
24-
<log type="junit" target="build/phpunit" logIncompleteSkipped="false"/>
23+
<log type="junit" target="build/phpunit"/>
2524
</logging>
2625
<filter>
2726
<whitelist processUncoveredFilesFromWhitelist="true">
2827
<directory suffix=".php">src</directory>
2928
</whitelist>
3029
</filter>
31-
</phpunit>
30+
</phpunit>

src/Constraint/BodyMatchesConstraint.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class BodyMatchesConstraint extends Constraint
1313

1414
public function __construct(Constraint $constraint)
1515
{
16-
parent::__construct();
1716
$this->constraint = $constraint;
1817
}
1918

src/Constraint/HasHeaderConstraint.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ class HasHeaderConstraint extends Constraint
1717

1818
public function __construct(string $name, $constraint = null)
1919
{
20-
parent::__construct();
21-
2220
if ($constraint === null) {
2321
$constraint = Assert::logicalNot(Assert::isEmpty());
2422
} elseif (!$constraint instanceof Constraint) {

src/Constraint/HasMethodConstraint.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class HasMethodConstraint extends Constraint
1313

1414
public function __construct(string $method)
1515
{
16-
parent::__construct();
1716
$this->method = $method;
1817
}
1918

src/Constraint/HasQueryParameterConstraint.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ class HasQueryParameterConstraint extends Constraint
1313

1414
public function __construct($nameMatcher, $valueMatcher = null)
1515
{
16-
parent::__construct();
17-
1816
$this->inner = new UrlEncodedMatches($nameMatcher, $valueMatcher);
1917
}
2018

@@ -61,4 +59,4 @@ public function toString(): string
6159
{
6260
return 'query string ' . $this->inner->toString();
6361
}
64-
}
62+
}

src/Constraint/HasStatusConstraint.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ class HasStatusConstraint extends Constraint
1414

1515
public function __construct($status)
1616
{
17-
parent::__construct();
18-
1917
if (!$status instanceof Constraint) {
2018
$status = Assert::equalTo($status);
2119
}

0 commit comments

Comments
 (0)