Lint PHP code psr-12, add GH action
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use Tests\TestCase;
|
||||
|
||||
use function Pest\Faker\faker;
|
||||
|
||||
it('can register', function () {
|
||||
@@ -11,13 +11,13 @@ it('can register', function () {
|
||||
'hear_about_us' => 'google',
|
||||
'password' => 'secret',
|
||||
'password_confirmation' => 'secret',
|
||||
'agree_terms' => true
|
||||
'agree_terms' => true,
|
||||
])
|
||||
->assertSuccessful()
|
||||
->assertJsonStructure(['id', 'name', 'email']);
|
||||
$this->assertDatabaseHas('users', [
|
||||
'name' => 'Test User',
|
||||
'email' => 'test@test.app'
|
||||
'email' => 'test@test.app',
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -40,17 +40,17 @@ it('cannot register with disposable email', function () {
|
||||
'dumliyupse@gufum.com',
|
||||
'kcs79722@zslsz.com',
|
||||
'pfizexwxtdifxupdhr@tpwlb.com',
|
||||
'qvj86ypqfm@email.edu.pl'
|
||||
'qvj86ypqfm@email.edu.pl',
|
||||
]);
|
||||
|
||||
$this->postJson('/register', [
|
||||
'name' => 'Test disposable',
|
||||
'email' => $email,
|
||||
'hear_about_us' => 'google',
|
||||
'password' => 'secret',
|
||||
'password_confirmation' => 'secret',
|
||||
'agree_terms' => true
|
||||
])
|
||||
'name' => 'Test disposable',
|
||||
'email' => $email,
|
||||
'hear_about_us' => 'google',
|
||||
'password' => 'secret',
|
||||
'password_confirmation' => 'secret',
|
||||
'agree_terms' => true,
|
||||
])
|
||||
->assertStatus(422)
|
||||
->assertJsonValidationErrors(['email'])
|
||||
->assertJson([
|
||||
|
||||
Reference in New Issue
Block a user