feat(tia): continues to work on poc

This commit is contained in:
nuno maduro
2026-04-16 10:59:06 -07:00
parent e91634ff05
commit 41f11c0ef3
11 changed files with 668 additions and 20 deletions

View File

@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace Pest\Contracts\Plugins;
use Pest\Plugins\Tia\CachedTestResult;
/**
* Plugins implementing this interface are consulted before each test's
* `setUp()`. The return value controls what happens:
*
* - `null` → test proceeds normally.
* - `CachedTestResult` → test replays the cached status. For non-success
* statuses the appropriate exception is thrown
* from `setUp` (PHPUnit handles it natively). For
* success, a synthetic assertion is registered and
* the body + tearDown are skipped via a flag.
*
* @internal
*/
interface BeforeEachable
{
public function beforeEach(string $filename, string $testId): ?CachedTestResult;
}