mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
feat: custom presets
This commit is contained in:
13
tests/Unit/Preset.php
Normal file
13
tests/Unit/Preset.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
pest()->presets()->custom('myFramework', function (array $userNamespaces) {
|
||||
return [
|
||||
expect($userNamespaces)->toBe(['Pest']),
|
||||
];
|
||||
});
|
||||
|
||||
test('preset invalid name', function () {
|
||||
$this->preset()->myAnotherFramework();
|
||||
})->throws(InvalidArgumentException::class, 'The preset [myAnotherFramework] does not exist. The available presets are [php, laravel, strict, security, relaxed, myFramework].');
|
||||
|
||||
arch()->preset()->myFramework();
|
||||
Reference in New Issue
Block a user