feat: initial work on presets

This commit is contained in:
Nuno Maduro
2024-06-08 20:54:46 +01:00
parent c7bcb6eb7b
commit 60b1e63c23
9 changed files with 156 additions and 6 deletions

View File

@ -12,6 +12,7 @@ use Pest\Factories\TestCaseMethodFactory;
use Pest\Mutate\Decorators\TestCallDecorator as MutationTestCallDecorator;
use Pest\PendingCalls\Concerns\Describable;
use Pest\Plugins\Only;
use Pest\Preset;
use Pest\Support\Backtrace;
use Pest\Support\Exporter;
use Pest\Support\HigherOrderCallables;
@ -521,4 +522,12 @@ final class TestCall
$testCase->attributes = array_merge($testCase->attributes, $this->testCaseFactoryAttributes);
}
}
/**
* Uses the given preset on the test.
*/
public function preset(): Preset
{
return new Preset($this);
}
}