<commit_before><?php

namespace Tests\Feature;

use App\User;
use Tests\IntegrationTestCase;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\Storage;
use Illuminate\Foundation\Testing\DatabaseMigrations;


class EditUsersTest extends IntegrationTestCase
{
    use DatabaseMigrations;

    protected $user;

    protected $update_data = [
        'name' => '<NAME>',
        'email' => '<EMAIL>',
        'about' => 'New user about info',
        'profession' => 'New profession',
        'country' => 'New country',
        'role' => 2
    ];

    public function setUp()
    {
        parent::setUp();

        $this->user = factory(User::class)->create();
    }
    
    /** @test */
    public function an_authorized_user_can_edit_user()
    {
        $this->signInAdmin();

        $response = $this->get(route('users.edit', ['user' => $this->user->id]))
            ->assertStatus(200);

        $response->assertViewIs('users.edit');
        $response->assertSee($this->user->name);
        $response->assertSee($this->user->email);
    }<commit_msg>Fix Edit Users test to assert escaped user name<commit_after><?php

namespace Tests\Feature;

use App\User;
use Tests\IntegrationTestCase;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\Storage;
use Illuminate\Foundation\Testing\DatabaseMigrations;


class EditUsersTest extends IntegrationTestCase
{
    use DatabaseMigrations;

    protected $user;

    protected $update_data = [
        'name' => '<NAME>',
        'email' => '<EMAIL>',
        'about' => 'New user about info',
        'profession' => 'New profession',
        'country' => 'New country',
        'role' => 2
    ];

    public function setUp()
    {
        parent::setUp();

        $this->user = factory(User::class)->create();
    }
    
    /** @test */
    public function an_authorized_user_can_edit_user()
    {
        $this->signInAdmin();

        $response = $this->get(route('users.edit', ['user' => $this->user->id]))
            ->assertStatus(200);

        $response->assertViewIs('users.edit');
        $response->assertSee(e($this->user->name));
        $response->assertSee($this->user->email);
    }
{'fraction_non_alphanumeric': 0.15849748053137883, 'fraction_numerical': 0.0036646816307833257, 'mean_word_length': 2.8248686514886163, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 49, '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': '7127049', 'n_tokens_mistral': 655, 'n_tokens_neox': 649, 'n_words': 126}