mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
feat: adds support for PHPUnit 10.4
This commit is contained in:
@ -18,15 +18,15 @@
|
|||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.1.0",
|
"php": "^8.1.0",
|
||||||
"brianium/paratest": "^7.2.8",
|
"brianium/paratest": "^7.2.9",
|
||||||
"nunomaduro/collision": "^7.9.0",
|
"nunomaduro/collision": "^7.9.0",
|
||||||
"nunomaduro/termwind": "^1.15.1",
|
"nunomaduro/termwind": "^1.15.1",
|
||||||
"pestphp/pest-plugin": "^2.1.1",
|
"pestphp/pest-plugin": "^2.1.1",
|
||||||
"pestphp/pest-plugin-arch": "^2.3.3",
|
"pestphp/pest-plugin-arch": "^2.3.3",
|
||||||
"phpunit/phpunit": "^10.3.5"
|
"phpunit/phpunit": "^10.4.0"
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"phpunit/phpunit": ">10.3.5",
|
"phpunit/phpunit": ">10.4.0",
|
||||||
"sebastian/exporter": "<5.1.0",
|
"sebastian/exporter": "<5.1.0",
|
||||||
"webmozart/assert": "<1.11.0"
|
"webmozart/assert": "<1.11.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -967,6 +967,7 @@ final class Expectation
|
|||||||
}
|
}
|
||||||
|
|
||||||
Assert::assertInstanceOf($exception, $e, $message);
|
Assert::assertInstanceOf($exception, $e, $message);
|
||||||
|
|
||||||
$callback($e);
|
$callback($e);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|||||||
@ -297,6 +297,7 @@ final class WrapperRunner implements RunnerInterface
|
|||||||
array_merge_recursive($testResultSum->phpDeprecations(), $testResult->phpDeprecations()),
|
array_merge_recursive($testResultSum->phpDeprecations(), $testResult->phpDeprecations()),
|
||||||
array_merge_recursive($testResultSum->phpNotices(), $testResult->phpNotices()),
|
array_merge_recursive($testResultSum->phpNotices(), $testResult->phpNotices()),
|
||||||
array_merge_recursive($testResultSum->phpWarnings(), $testResult->phpWarnings()),
|
array_merge_recursive($testResultSum->phpWarnings(), $testResult->phpWarnings()),
|
||||||
|
$testResultSum->numberOfIssuesIgnoredByBaseline() + $testResult->numberOfIssuesIgnoredByBaseline(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -325,6 +326,8 @@ final class WrapperRunner implements RunnerInterface
|
|||||||
$testResultSum->phpDeprecations(),
|
$testResultSum->phpDeprecations(),
|
||||||
$testResultSum->phpNotices(),
|
$testResultSum->phpNotices(),
|
||||||
$testResultSum->phpWarnings(),
|
$testResultSum->phpWarnings(),
|
||||||
|
$testResultSum->numberOfIssuesIgnoredByBaseline(),
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->printer->printResults(
|
$this->printer->printResults(
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Pest Testing Framework 2.20.0.
|
Pest Testing Framework 2.21.0.
|
||||||
|
|
||||||
USAGE: pest <file> [options]
|
USAGE: pest <file> [options]
|
||||||
|
|
||||||
@ -14,6 +14,9 @@
|
|||||||
--cache-directory [dir] ............................ Specify cache directory
|
--cache-directory [dir] ............................ Specify cache directory
|
||||||
--generate-configuration Generate configuration file with suggested settings
|
--generate-configuration Generate configuration file with suggested settings
|
||||||
--migrate-configuration ....... Migrate configuration file to current format
|
--migrate-configuration ....... Migrate configuration file to current format
|
||||||
|
--generate-baseline [file] .................... Generate baseline for issues
|
||||||
|
--use-baseline [file] ........................ Use baseline to ignore issues
|
||||||
|
--ignore-baseline ..................... Do not use baseline to ignore issues
|
||||||
|
|
||||||
SELECTION OPTIONS:
|
SELECTION OPTIONS:
|
||||||
--bail ........................... Stop execution upon first not-passed test
|
--bail ........................... Stop execution upon first not-passed test
|
||||||
@ -89,7 +92,7 @@
|
|||||||
--testdox-html [file] .. Write test results in TestDox format (HTML) to file
|
--testdox-html [file] .. Write test results in TestDox format (HTML) to file
|
||||||
--testdox-text [file] Write test results in TestDox format (plain text) to file
|
--testdox-text [file] Write test results in TestDox format (plain text) to file
|
||||||
--log-events-text [file] ............... Stream events as plain text to file
|
--log-events-text [file] ............... Stream events as plain text to file
|
||||||
--log-events-verbose-text [file] Stream events as plain text (with telemetry information) to file
|
--log-events-verbose-text [file] Stream events as plain text with extended information to file
|
||||||
--no-logging ....... Ignore logging configured in the XML configuration file
|
--no-logging ....... Ignore logging configured in the XML configuration file
|
||||||
|
|
||||||
CODE COVERAGE OPTIONS:
|
CODE COVERAGE OPTIONS:
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
|
|
||||||
Pest Testing Framework 2.20.0.
|
Pest Testing Framework 2.21.0.
|
||||||
|
|
||||||
|
|||||||
@ -57,8 +57,9 @@ test('failures 3', function () {
|
|||||||
expect(function () {
|
expect(function () {
|
||||||
throw new Exception();
|
throw new Exception();
|
||||||
})->toThrow(function (RuntimeException $e) {
|
})->toThrow(function (RuntimeException $e) {
|
||||||
|
//
|
||||||
});
|
});
|
||||||
})->throws(ExpectationFailedException::class, 'Failed asserting that Exception Object');
|
})->throws(ExpectationFailedException::class, 'Failed asserting that an object is an instance of class RuntimeException.');
|
||||||
|
|
||||||
test('failures 4', function () {
|
test('failures 4', function () {
|
||||||
expect(function () {
|
expect(function () {
|
||||||
@ -73,7 +74,7 @@ test('failures 5', function () {
|
|||||||
expect(function () {
|
expect(function () {
|
||||||
throw new Exception('actual message');
|
throw new Exception('actual message');
|
||||||
})->toThrow('expected message');
|
})->toThrow('expected message');
|
||||||
})->throws(ExpectationFailedException::class, 'Failed asserting that \'actual message\' contains "expected message".');
|
})->throws(ExpectationFailedException::class, 'Failed asserting that \'actual message\' [ASCII](length: 14) contains "expected message" [ASCII](length: 16).');
|
||||||
|
|
||||||
test('failures 6', function () {
|
test('failures 6', function () {
|
||||||
expect(function () {
|
expect(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user