<commit_before><?php

namespace Tests\Feature;

use Illuminate\Foundation\Testing\DatabaseMigrations;
use Tests\TestCase;
use Laravel\Passport\Passport;
use Knot\Models\User;
use Doorman;

class AuthenticatesUserTest extends TestCase
{
    use DatabaseMigrations;

    
    /** @test */
    function can_register_a_new_user()
    {
        $this->withExceptionHandling();
        
        $userData =  [
            'first_name' => 'Jane',
            'last_name' => 'Doe',
            'email' => '<EMAIL>',
            'password' => '<PASSWORD>',
            'code' => Doorman::generate()->for('<EMAIL>')->make()->first()->code
        ];
        $response = $this->json('POST', 'api/auth/user', $userData);

        $response->assertStatus(200);

        $this->assertEquals(1, User::count());
    }
    
    /** @test */
    function can_fetch_an_authenticated_user()
    {
        $this->authenticate();
        
        $response = $this->get('api/auth/user');

        $response->assertStatus(200);
    }
    
}<commit_msg>Fixes empty spaces in AuthenticatesUsersTest<commit_after><?php

namespace Tests\Feature;

use Illuminate\Foundation\Testing\DatabaseMigrations;
use Tests\TestCase;
use Laravel\Passport\Passport;
use Knot\Models\User;
use Doorman;

class AuthenticatesUserTest extends TestCase
{
    use DatabaseMigrations;

    /** @test */
    function can_register_a_new_user()
    {
        $this->withExceptionHandling();

        $userData =  [
            'first_name' => 'Jane',
            'last_name' => 'Doe',
            'email' => '<EMAIL>',
            'password' => '<PASSWORD>',
            'code' => Doorman::generate()->for('<EMAIL>')->make()->first()->code
        ];
        $response = $this->json('POST', 'api/auth/user', $userData);

        $response->assertStatus(200);

        $this->assertEquals(1, User::count());
    }

    /** @test */
    function can_fetch_an_authenticated_user()
    {
        $this->authenticate();

        $response = $this->get('api/auth/user');

        $response->assertStatus(200);
    }

}
{'fraction_non_alphanumeric': 0.1650485436893204, 'fraction_numerical': 0.006796116504854369, 'mean_word_length': 2.529109589041096, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '238752', 'n_tokens_mistral': 652, 'n_tokens_neox': 631, 'n_words': 100}