mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 02:07:23 +01:00
Fix an issue where beforeEach/afterEach functions were called on other describe blocks with the same name
This commit is contained in:
15
src/Support/Description.php
Normal file
15
src/Support/Description.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Pest\Support;
|
||||
|
||||
final readonly class Description implements \Stringable
|
||||
{
|
||||
public function __construct(private string $description) {}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
}
|
||||
@ -104,7 +104,7 @@ final class Str
|
||||
/**
|
||||
* Creates a describe block as `$describeDescription` → `$testDescription` format.
|
||||
*
|
||||
* @param array<int, string> $describeDescriptions
|
||||
* @param array<int, Description> $describeDescriptions
|
||||
*/
|
||||
public static function describe(array $describeDescriptions, string $testDescription): string
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user