tests: for test names starting with P

This commit is contained in:
Nuno Maduro
2023-03-19 18:34:20 +00:00
parent 8f630c064f
commit 88e047bd27
3 changed files with 22 additions and 2 deletions

13
tests/Unit/TestName.php Normal file
View 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'],
]);