File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838 "laravel/pint" : " ^1.27" ,
3939 "mockery/mockery" : " ^1.5.0" ,
4040 "nunomaduro/collision" : " ^8.0" ,
41+ "orchestra/pest-plugin-testbench" : " ^4.1" ,
4142 "orchestra/testbench" : " ^9.0|^10.0|^11.0" ,
4243 "pestphp/pest" : " ^3.0|^4.0" ,
4344 "pestphp/pest-plugin-laravel" : " ^3.0|^4.0" ,
4445 "phpunit/phpunit" : " ^11.0|^12.0" ,
45- "spatie/laravel-ray" : " ^1.26" ,
4646 "spatie/laravel-passkeys" : " ^1.0" ,
47+ "spatie/laravel-ray" : " ^1.26" ,
4748 "spatie/laravel-typescript-transformer" : " ^2.3" ,
4849 "spatie/typescript-transformer" : " ^2.2"
4950 },
Original file line number Diff line number Diff line change 55use Code16 \Sharp \Auth \Passkeys \Commands \UpdatePasskeyNameCommand ;
66use Code16 \Sharp \Auth \Passkeys \Entity \PasskeyEntity ;
77use Code16 \Sharp \Auth \Passkeys \Entity \PasskeyList ;
8- use Code16 \Sharp \Auth \Passkeys \PasskeyEventSubscriber ;
98use Code16 \Sharp \Tests \Fixtures \Entities \PersonEntity ;
109use Code16 \Sharp \Tests \Fixtures \User ;
1110use Illuminate \Database \Eloquent \Casts \Attribute ;
2625use Spatie \LaravelPasskeys \Models \Passkey ;
2726use Webauthn \PublicKeyCredentialCreationOptions ;
2827
29- uses (LazilyRefreshDatabase::class);
28+ use function Orchestra \Testbench \Pest \defineEnvironment ;
29+
30+ pest ()->use (LazilyRefreshDatabase::class);
31+
32+ defineEnvironment (function () {
33+ sharp ()->config ()->enablePasskeys ();
34+ });
3035
3136beforeEach (function () {
3237 Schema::create ('users ' , function (Blueprint $ table ) {
5358 config ()->set ('passkeys.models.passkey ' , TestPasskey::class);
5459
5560 sharp ()->config ()
56- ->declareEntity (PersonEntity::class)
57- ->enablePasskeys ();
61+ ->declareEntity (PersonEntity::class);
5862});
5963
6064function createPasskeyTestUser (array $ attributes = []): PasskeyTestUser
Original file line number Diff line number Diff line change 77use Code16 \ContentRenderer \ContentRendererServiceProvider ;
88use Code16 \Sharp \SharpInternalServiceProvider ;
99use Illuminate \Testing \Fluent \AssertableJson ;
10+ use Orchestra \Testbench \Pest \WithPest ;
1011use Orchestra \Testbench \TestCase as Orchestra ;
1112use PHPUnit \Framework \Assert as PHPUnit ;
1213
1314class TestCase extends Orchestra
1415{
16+ use WithPest;
17+
1518 protected function setUp (): void
1619 {
1720 parent ::setUp ();
@@ -63,7 +66,6 @@ public function getEnvironmentSetUp($app)
6366 // We have to set these two because otherwise corresponding routes won't be loaded at all
6467 sharp ()->config ()
6568 ->enableForgottenPassword ()
66- ->enableImpersonation ()
67- ->enablePasskeys ();
69+ ->enableImpersonation ();
6870 }
6971}
You can’t perform that action at this time.
0 commit comments