Compare commits

..

12 Commits

Author SHA1 Message Date
5c0df87f52 release: v2.5.1 2023-04-18 00:47:56 +01:00
ec6a81735a chore: bumps phpunit dependency 2023-04-18 00:45:41 +01:00
2ea37f3424 Merge pull request #772 from MaurizioMoreo/pcov_fix
Add PCOV availability check
2023-04-16 14:11:05 +01:00
2e4206cb97 tests: adjusts snapshots 2023-04-15 16:17:22 +01:00
72b3cdaab4 Merge pull request #770 from ganyicz/2.x
Update stub extensions
2023-04-15 16:12:16 +01:00
9744b9848e Merge pull request #783 from fabio-ivona/fix-comments-in-test-name
fix comments in dokblocks
2023-04-15 11:26:06 +01:00
e1143d2cfc remove ->only() 2023-04-15 11:52:07 +02:00
5861b0498a fix comments in dokblocks 2023-04-15 10:45:51 +02:00
f6d9aa51bd chore: bump dependencies 2023-04-14 11:50:44 +01:00
518035514e Add PHPDBG availability check 2023-04-09 09:27:52 +02:00
97dbda92e6 Update stub extensions 2023-04-08 01:24:00 +02:00
4520fe918a Add PCOV availability check 2023-04-07 17:19:34 +02:00
21 changed files with 39 additions and 14 deletions

View File

@ -2,6 +2,11 @@
## Unreleased
## [v2.5.1 (2023-04-18)](https://github.com/pestphp/pest/compare/v2.5.0...v2.5.1)
### Chore
- Bumps PHPUnit to `^10.1.1` ([ec6a817](https://github.com/pestphp/pest/commit/ec6a81735af19f5463d24545df97535d77697ec6))
## [v2.5.0 (2023-04-14)](https://github.com/pestphp/pest/compare/v2.4.0...v2.5.0)
### Chore

View File

@ -19,15 +19,15 @@
"require": {
"php": "^8.1.0",
"brianium/paratest": "^7.1.3",
"nunomaduro/collision": "^7.4.0",
"nunomaduro/collision": "^7.5.0",
"nunomaduro/termwind": "^1.15.1",
"pestphp/pest-plugin": "^2.0.1",
"pestphp/pest-plugin-arch": "^2.1.1",
"phpunit/phpunit": "^10.1.0"
"phpunit/phpunit": "^10.1.1"
},
"conflict": {
"webmozart/assert": "<1.11.0",
"phpunit/phpunit": ">10.1.0"
"phpunit/phpunit": ">10.1.1"
},
"autoload": {
"psr-4": {

View File

@ -14,7 +14,17 @@ final class TestDox implements AddsAnnotations
*/
public function __invoke(TestCaseMethodFactory $method, array $annotations): array
{
$annotations[] = "@testdox $method->description";
/*
* escapes docblock according to
* https://manual.phpdoc.org/HTMLframesConverter/default/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.desc
*
* note: '@' escaping is not needed as it cannot be the first character of the line (it always starts with @testdox
*/
assert($method->description !== null);
$methodDescription = str_replace('*/', '{@*}', $method->description);
$annotations[] = "@testdox $methodDescription";
return $annotations;
}

View File

@ -6,7 +6,7 @@ namespace Pest;
function version(): string
{
return '2.4.0';
return '2.5.1';
}
function testDirectory(string $file = ''): string

View File

@ -26,11 +26,11 @@ final class Init implements HandlesArguments
* The files that will be created.
*/
private const STUBS = [
'phpunit.xml' => 'phpunit.xml',
'Pest.php' => 'tests/Pest.php',
'TestCase.php' => 'tests/TestCase.php',
'Unit/ExampleTest.php' => 'tests/Unit/ExampleTest.php',
'Feature/ExampleTest.php' => 'tests/Feature/ExampleTest.php',
'phpunit.xml.stub' => 'phpunit.xml',
'Pest.php.stub' => 'tests/Pest.php',
'TestCase.php.stub' => 'tests/TestCase.php',
'Unit/ExampleTest.php.stub' => 'tests/Unit/ExampleTest.php',
'Feature/ExampleTest.php.stub' => 'tests/Feature/ExampleTest.php',
];
/**

View File

@ -42,6 +42,14 @@ final class Coverage
return false;
}
if ($runtime->hasPCOV()) {
return true;
}
if ($runtime->hasPHPDBGCodeCoverage()) {
return true;
}
if (! $runtime->hasXdebug()) {
return true;
}

View File

@ -1,5 +1,5 @@
Pest Testing Framework 2.4.0.
Pest Testing Framework 2.5.1.
USAGE: pest <file> [options]

View File

@ -977,6 +977,7 @@
✓ Німеччина
✓ Nam Định
✓ 呼和浩特
✓ test /** with comment */ should do
PASS Tests\Unit\TestSuite
✓ it does not allow to add the same test description twice
@ -1016,4 +1017,4 @@
PASS Tests\Visual\Version
✓ visual snapshot of help command output
Tests: 1 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 14 skipped, 710 passed (1717 assertions)
Tests: 1 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 14 skipped, 711 passed (1719 assertions)

View File

@ -1,3 +1,3 @@
Pest Testing Framework 2.4.0.
Pest Testing Framework 2.5.1.

View File

@ -61,6 +61,7 @@ $names = [
'Німеччина' => '__pest_evaluable_Німеччина',
'Nam Định' => '__pest_evaluable_Nam_Định',
'呼和浩特' => '__pest_evaluable_呼和浩特',
'test /** with comment */ should do' => '__pest_evaluable_test_____with_comment____should_do',
];
foreach ($names as $name => $methodName) {

View File

@ -18,7 +18,7 @@ $run = function () {
test('parallel', function () use ($run) {
expect($run('--exclude-group=integration'))
->toContain('Tests: 1 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 11 skipped, 698 passed (1702 assertions)')
->toContain('Tests: 1 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 11 skipped, 699 passed (1704 assertions)')
->toContain('Parallel: 3 processes');
})->skipOnWindows();