mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Pass description into describe call
This commit is contained in:
@ -18,6 +18,7 @@ use Pest\Repositories\DatasetsRepository;
|
||||
use Pest\Support\Backtrace;
|
||||
use Pest\Support\Container;
|
||||
use Pest\Support\DatasetInfo;
|
||||
use Pest\Support\Description;
|
||||
use Pest\Support\HigherOrderTapProxy;
|
||||
use Pest\TestSuite;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@ -95,7 +96,7 @@ if (! function_exists('describe')) {
|
||||
{
|
||||
$filename = Backtrace::testFile();
|
||||
|
||||
return new DescribeCall(TestSuite::getInstance(), $filename, $description, $tests);
|
||||
return new DescribeCall(TestSuite::getInstance(), $filename, new Description($description), $tests);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -26,21 +26,16 @@ final class DescribeCall
|
||||
*/
|
||||
private ?BeforeEachCall $currentBeforeEachCall = null;
|
||||
|
||||
/**
|
||||
* The unique description for this describe block
|
||||
*/
|
||||
private readonly Description $description;
|
||||
|
||||
/**
|
||||
* Creates a new Pending Call.
|
||||
*/
|
||||
public function __construct(
|
||||
public readonly TestSuite $testSuite,
|
||||
public readonly string $filename,
|
||||
string $description,
|
||||
public readonly Description $description,
|
||||
public readonly Closure $tests
|
||||
) {
|
||||
$this->description = new Description($description);
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,7 @@ $run = function () {
|
||||
|
||||
test('parallel', function () use ($run) {
|
||||
expect($run('--exclude-group=integration'))
|
||||
->toContain('Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 38 todos, 24 skipped, 1142 passed (2720 assertions)')
|
||||
->toContain('Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 39 todos, 26 skipped, 1172 passed (2761 assertions)')
|
||||
->toContain('Parallel: 3 processes');
|
||||
})->skipOnWindows();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user