Skip to content

Instantly share code, notes, and snippets.

@Tynael
Created October 26, 2023 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tynael/d081b6d93f9fb1fe42d3c1fdf088405e to your computer and use it in GitHub Desktop.
Save Tynael/d081b6d93f9fb1fe42d3c1fdf088405e to your computer and use it in GitHub Desktop.
Laravel — Improve Email Validation
<?php
declare(strict_types=1);
namespace Tests\Feature;
use Tests\TestCase;
use Faker\Factory as Faker;
class UserControllerTest extends TestCase
{
public function test_can_create_user(): void
{
$faker = Faker::create();
$response = $this->postJson(
route('user.create'),
[
'name' => $faker->name,
'password' => $faker->password(),
'email' => 'carol@neutrondev.com',
]);
$response->assertSuccessful();
}
}
@Tynael
Copy link
Author

Tynael commented Oct 26, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment