mirror of
https://github.com/pestphp/pest.git
synced 2026-06-05 10:52:14 +02:00
wip
This commit is contained in:
@ -17,18 +17,12 @@ final readonly class Bootstrapper implements BootstrapperContract
|
|||||||
public function __construct(private Container $container) {}
|
public function __construct(private Container $container) {}
|
||||||
|
|
||||||
public function boot(): void
|
public function boot(): void
|
||||||
{
|
|
||||||
$this->container->add(State::class, new FileState($this->tempDir()));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* across worktrees of the same repo. See {@see Storage} for the key
|
|
||||||
*/
|
|
||||||
private function tempDir(): string
|
|
||||||
{
|
{
|
||||||
$testSuite = $this->container->get(TestSuite::class);
|
$testSuite = $this->container->get(TestSuite::class);
|
||||||
assert($testSuite instanceof TestSuite);
|
assert($testSuite instanceof TestSuite);
|
||||||
|
|
||||||
return Storage::tempDir($testSuite->rootPath);
|
$tempDir = Storage::tempDir($testSuite->rootPath);
|
||||||
|
|
||||||
|
$this->container->add(State::class, new FileState($tempDir));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user