<commit_before><?php

namespace LaVestima\HannaAgency\InfrastructureBundle\Tests;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class BaseWebTestCase extends WebTestCase
{
    protected $client;

    public function __construct($name = null, array $data = [], $dataName = '')
    {
        $this->client = static::createClient();

        parent::__construct($name, $data, $dataName);
    }

//    public function setUp()
//    {
//
//    }

    protected function logInAdmin()
    {
        $this->client = static::createClient([], [
            'PHP_AUTH_USER' => 'admin',
            'PHP_AUTH_PW'   => '<PASSWORD>',
        ]);
    }

    protected function logInCustomer()
    {
        $this->client = static::createClient([], [
            'PHP_AUTH_USER' => 'customer',
            'PHP_AUTH_PW'   => '<PASSWORD>',
        ]);
    }

//    protected function logInUser()
//    {
//        $this->client = static::createClient([], [
//            'PHP_AUTH_USER' => 'user',
//            'PHP_AUTH_PW'   => '<PASSWORD>',
//        ]);
//    }

    protected function logInGuest()
    {<commit_msg>Clear the client before every test<commit_after><?php

namespace LaVestima\HannaAgency\InfrastructureBundle\Tests;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class BaseWebTestCase extends WebTestCase
{
    protected $client;

    public function __construct($name = null, array $data = [], $dataName = '')
    {
        $this->createNewClient();

        parent::__construct($name, $data, $dataName);
    }

    protected function createNewClient()
    {
        $this->client = static::createClient();
    }

    public function setUp()
    {
        $this->createNewClient();
    }

    protected function logInAdmin()
    {
        $this->client = static::createClient([], [
            'PHP_AUTH_USER' => 'admin',
            'PHP_AUTH_PW'   => '<PASSWORD>',
        ]);
    }

    protected function logInCustomer()
    {
        $this->client = static::createClient([], [
            'PHP_AUTH_USER' => 'customer',
            'PHP_AUTH_PW'   => '<PASSWORD>',
        ]);
    }

//    protected function logInUser()
//    {
//        $this->client = static::createClient([], [
//            'PHP_AUTH_USER' => 'user',
//            'PHP_AUTH_PW'   => '<PASSWORD>',
//        ]);
//    }

    protected function logInGuest()
    {
{'fraction_non_alphanumeric': 0.15847457627118644, 'fraction_numerical': 0.0, 'mean_word_length': 2.247592847317744, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 31, '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': '1220799', 'n_tokens_mistral': 714, 'n_tokens_neox': 701, 'n_words': 122}