<commit_before><?php

use Illuminate\Foundation\Testing\DatabaseTransactions;

class UserLoginTest extends TestCase
{
    use DatabaseTransactions;
    use CreateUser;

    /**
     * @test
     */
    public function it_provides_successful_login()
    {
        $user = $this->createUser(['email' => '<EMAIL>', 'password' => <PASSWORD>('password')]);

        $this->visit('auth/login');

        $this->see('Login');
        $this->see('Password');
        $this->see('Remember me');

        $this->type($user->email, 'email');
        $this->type('password', 'password');

        $this->press('Login');

        $this->see('Well done! Please tell us what would you like to do');
    }

    /**
     * @test
     */
    public function it_denies_bad_login()
    {
        $user = $this->createUser(['email' => '<EMAIL>', 'password' => <PASSWORD>('password')]);

        $this->visit('auth/login');

        $this->see('Login');
        $this->see('Password');
        $this->see('Remember me');

        $this->type($user->email, 'email');
        $this->type('BAD PASSWORD!', 'password');

        $this->press('Login');

        $this->see('These credentials do not match our records');
    }

    /**
     * @test
     */
    public function it_requests_login_when_attempting_to_access_a_protected_page()
    {
        $this->visit(route('user.agenda'));

        $this->seePageIs('/auth/login');
        
        $this->see('Login');
        $this->see('Password');
        $this->see('Remember me');
    }
}<commit_msg>Add logout test coverage<commit_after><?php

use Illuminate\Foundation\Testing\DatabaseTransactions;

class UserLoginTest extends TestCase
{
    use DatabaseTransactions;
    use CreateUser;

    /**
     * @test
     */
    public function it_provides_successful_login()
    {
        $user = $this->createUser(['email' => '<EMAIL>', 'password' => <PASSWORD>('password')]);

        $this->visit('auth/login');

        $this->see('Login');
        $this->see('Password');
        $this->see('Remember me');

        $this->type($user->email, 'email');
        $this->type('password', 'password');

        $this->press('Login');

        $this->see('Well done! Please tell us what would you like to do');
    }

    /**
     * @test
     */
    public function it_provides_logout()
    {
        $user = $this->createUser();

        $this->actingAs($user);

        $this->visit('auth/logout');

        $this->seePageIs('/');

        $this->see('Login');
    }

    /**
     * @test
     */
    public function it_denies_bad_login()
    {
        $user = $this->createUser(['email' => '<EMAIL>', 'password' => bcrypt('password')]);

        $this->visit('auth/login');

        $this->see('Login');
        $this->see('Password');
        $this->see('Remember me');

        $this->type($user->email, 'email');
        $this->type('BAD PASSWORD!', 'password');

        $this->press('Login');

        $this->see('These credentials do not match our records');
    }

    /**
     * @test
     */
    public function it_requests_login_when_attempting_to_access_a_protected_page()
    {
        $this->visit(route('user.agenda'));

        $this->seePageIs('/auth/login');

        $this->see('Login');
        $this->see('Password');
        $this->see('Remember me');
    }
}
{'fraction_non_alphanumeric': 0.19347037484885127, 'fraction_numerical': 0.0, 'mean_word_length': 2.446875, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 73, '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': '3103233', 'n_tokens_mistral': 1033, 'n_tokens_neox': 1000, 'n_words': 169}