app->make('config')->get('webauthn') ); } public function test_publishes_config(): void { static::assertSame( [WebAuthnServiceProvider::CONFIG => $this->app->configPath('webauthn.php')], ServiceProvider::$publishGroups['config'] ); } /** * @define-env usesCustomTestTime */ public function test_publishes_migrations(): void { static::assertSame( [ realpath(WebAuthnServiceProvider::MIGRATIONS . '/2022_07_01_000000_create_webauthn_credentials.php') => $this->app->databasePath("migrations/2020_01_01_163025_create_webauthn_credentials.php"), ], ServiceProvider::pathsToPublish(WebAuthnServiceProvider::class, 'migrations') ); } protected function usesCustomTestTime() { $this->travelTo(Carbon::create(2020, 01, 01, 16, 30, 25)); } public function test_bounds_user(): void { static::assertNull($this->app->make(WebAuthnAuthenticatable::class)); $user = new class extends Fluent implements WebAuthnAuthenticatable { use WebAuthnAuthentication; }; $this->app->instance(Authenticatable::class, $user); static::assertSame($user, $this->app->make(WebAuthnAuthenticatable::class)); } public function test_publishes_routes_file(): void { static::assertSame( [WebAuthnServiceProvider::ROUTES => $this->app->basePath('routes/webauthn.php')], ServiceProvider::$publishGroups['routes'] ); } }