markTestSkipped('Registration support is not enabled.'); return; } $response = $this->get('/register'); $response->assertStatus(200); } public function test_registration_screen_cannot_be_rendered_if_support_is_disabled(): void { if (Features::enabled(Features::registration())) { $this->markTestSkipped('Registration support is enabled.'); return; } $response = $this->get('/register'); $response->assertStatus(404); } public function test_new_users_can_register(): void { if (! Features::enabled(Features::registration())) { $this->markTestSkipped('Registration support is not enabled.'); return; } $response = $this->post('/register', [ 'first_name' => 'Test User_first_name', 'last_name' => 'User_last_name', 'email' => 'test@example.com', 'birthdate' => '27-07-2000', 'gender' => 'male', 'has_hypo' => 0, 'has_hyper' => 1, 'country' => 'ru', 'city' => 'Msk', 'lang' => 'ru', 'weight' => 90, 'height' => 180, 'password' => 'password', 'password_confirmation' => 'password', 'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature(), ]); $this->assertAuthenticated(); $response->assertRedirect(RouteServiceProvider::HOME); } }