'John Doe', 'email' => 'johndoe@example.com', 'content' => 'Hello, this is a test message.', ]; $response = $this->postJson('/api/contact', $formData); $response->assertStatus(201); $formData = [ 'name' => 'John Doe', 'content' => 'Hello, this is a test message.', ]; $response = $this->postJson('/api/contact', $formData); $response->assertStatus(422); } }