<commit_before><?php

namespace Caesar\UserBundle\Tests\Controller;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class UserTest extends WebTestCase {
    private $identifier = "Chimere";
    private $password = "<PASSWORD>";
    
    public function testIdentification() {
        $client = static::createClient();
        $crawler = $client->request('GET', '/fr/login');
        $form = $crawler->selectButton("Connexion")->form();
        
        $form['_username'] = $this->identifier;
        
        $client->submit($form);   
        $this->assertTrue($crawler->filter('html:contains("' . $this->identifier . '")')->count() > 0);
    }  
    
    public function testAuthentificationAndInformations() {
        $client = static::createClient();
        
        $login = $client->request('GET', '/fr/login');
        $form_log = $login->selectButton("Connexion")->form();
        $form_log['_username'] = $this->identifier;
        $client->submit($form_log);
        
        $profile = $client->request('GET', '/fr/profile');
        $link = $profile->filterXpath("//a[@name='modifyProfile']")->eq(1)->link();
        $client->click($link);
        $form_auth = $login->selectButton("Connexion")->form();
        $form_auth['caesar_userBundle_passwordType[plainPassword]'] = $this->password;
        $client->submit($form_auth);
        
        $form_profile = $profile->selectButton("Modifier mon profil")->form();
        $form_profile['caesar_userBundle_userUpdateType[name]'] = "Albert";
        $form_profile['caesar_userBundle_userUpdateType[plainPassword]'] = $this->password;
        $form_profile['caesar_userBundle_userUpdateType[confirmPassword]'] = $this->password;
        $client->submit($form_profile);
        
        $this->assertTrue($crawler->filter('html:contains("Albert")')->count() > 0);      
    }   

}<commit_msg>bugfix (tests)<commit_after><?php

namespace Caesar\UserBundle\Tests\Controller;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class UserTest extends WebTestCase {
    private $identifier = "Chimere";
    private $password = "<PASSWORD>";
    
    public function testIdentification() {
        $client = static::createClient();
        $crawler = $client->request('GET', '/fr/login');
        $form = $crawler->selectButton("Connexion")->form();
        
        $form['_username'] = $this->identifier;
        
        $client->submit($form);   
        $this->assertTrue($crawler->filter('html:contains("' . $this->identifier . '")')->count() > 0);
    }  
    
    public function testAuthentificationAndInformations() {
        $client = static::createClient();
        
        $login = $client->request('GET', '/fr/login');
        $form_log = $login->selectButton("Connexion")->form();
        $form_log['_username'] = $this->identifier;
        $client->submit($form_log);
        
        $profile = $client->request('GET', '/fr/profile');
        $link = $profile->filterXpath("//a[@name='modifyProfile']")->eq(1)->link();
        $client->click($link);
        $form_auth = $login->selectButton("Connexion")->form();
        $form_auth['caesar_userBundle_passwordType[plainPassword]'] = $this->password;
        $client->submit($form_auth);
        
        $form_profile = $profile->selectButton("Modifier mon profil")->form();
        $form_profile['caesar_userBundle_userUpdateType[name]'] = "Albert";
        $form_profile['caesar_userBundle_userUpdateType[plainPassword]'] = $this->password;
        $form_profile['caesar_userBundle_userUpdateType[confirmPassword]'] = $this->password;
        $client->submit($form_profile);
        
        $this->assertTrue($profile->filter('html:contains("Albert")')->count() > 0);      
    }   

}
{'fraction_non_alphanumeric': 0.17879194630872483, 'fraction_numerical': 0.001610738255033557, 'mean_word_length': 3.282758620689655, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 71, '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': '5995156', 'n_tokens_mistral': 1101, 'n_tokens_neox': 1100, 'n_words': 139}