mirror of
https://github.com/pestphp/pest.git
synced 2026-03-09 09:17:23 +01:00
feat(describe): continues work around hooks
This commit is contained in:
@ -10,7 +10,6 @@ use Pest\Factories\Covers\CoversClass;
|
||||
use Pest\Factories\Covers\CoversFunction;
|
||||
use Pest\Factories\Covers\CoversNothing;
|
||||
use Pest\Factories\TestCaseMethodFactory;
|
||||
use Pest\PendingCalls;
|
||||
use Pest\PendingCalls\Concerns\Describable;
|
||||
use Pest\Plugins\Only;
|
||||
use Pest\Support\Backtrace;
|
||||
@ -52,6 +51,8 @@ final class TestCall
|
||||
|
||||
$this->descriptionLess = $description === null;
|
||||
|
||||
$this->describing = DescribeCall::describing();
|
||||
|
||||
$this->testSuite->beforeEach->get($this->filename)[0]($this);
|
||||
}
|
||||
|
||||
@ -344,10 +345,11 @@ final class TestCall
|
||||
*/
|
||||
public function __destruct()
|
||||
{
|
||||
PendingCalls::test($this, function () {
|
||||
if ($this->describing) {
|
||||
$this->testCaseMethod->description = '`'.$this->describing.'` '.$this->testCaseMethod->description;
|
||||
$this->testCaseMethod->describing = $this->describing;
|
||||
}
|
||||
|
||||
$this->testSuite->tests->set($this->testCaseMethod);
|
||||
});
|
||||
$this->testSuite->tests->set($this->testCaseMethod);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user