mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
tests: for test names starting with P
This commit is contained in:
@ -910,6 +910,13 @@
|
||||
✓ it evaluates the code with ('version__ ', '__pest_evaluable_version___')
|
||||
✓ it evaluates the code with ('version\', '__pest_evaluable_version_')
|
||||
|
||||
PASS Tests\Unit\TestName
|
||||
✓ it may start with P with ('P\Tests\BarTest', 'Tests\BarTest')
|
||||
✓ it may start with P with ('P\Packages\Foo', 'Packages\Foo')
|
||||
✓ it may start with P with ('P\PPPackages\Foo', 'PPPackages\Foo')
|
||||
✓ it may start with P with ('PPPackages\Foo', 'PPPackages\Foo') #1
|
||||
✓ it may start with P with ('PPPackages\Foo', 'PPPackages\Foo') #2
|
||||
|
||||
PASS Tests\Unit\TestSuite
|
||||
✓ it does not allow to add the same test description twice
|
||||
✓ it alerts users about tests with arguments but no input
|
||||
@ -943,4 +950,4 @@
|
||||
PASS Tests\Visual\Version
|
||||
✓ visual snapshot of help command output
|
||||
|
||||
Tests: 2 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 18 skipped, 644 passed (1586 assertions)
|
||||
Tests: 2 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 18 skipped, 649 passed (1591 assertions)
|
||||
13
tests/Unit/TestName.php
Normal file
13
tests/Unit/TestName.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
it('may start with P', function (string $real, string $toBePrinted) {
|
||||
$printed = preg_replace('/P\\\/', '', $real, 1);
|
||||
|
||||
expect($printed)->toBe($toBePrinted);
|
||||
})->with([
|
||||
['P\Tests\BarTest', 'Tests\BarTest'],
|
||||
['P\Packages\Foo', 'Packages\Foo'],
|
||||
['P\PPPackages\Foo', 'PPPackages\Foo'],
|
||||
['PPPackages\Foo', 'PPPackages\Foo'],
|
||||
['PPPackages\Foo', 'PPPackages\Foo'],
|
||||
]);
|
||||
@ -15,6 +15,6 @@ $run = function () {
|
||||
};
|
||||
|
||||
test('parallel', function () use ($run) {
|
||||
expect($run())->toContain('Tests: 2 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 15 skipped, 635 passed (1573 assertions)')
|
||||
expect($run())->toContain('Tests: 2 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 15 skipped, 640 passed (1578 assertions)')
|
||||
->toContain('Parallel: 3 processes');
|
||||
})->skip(PHP_OS_FAMILY === 'Windows');
|
||||
|
||||
Reference in New Issue
Block a user