<commit_before><?php

namespace App\Containers\Email\Tests\Api\Functional;

use App\Kernel\Tests\PHPUnit\Abstracts\TestCase;

/**
 * Class SetEmailTest.
 *
 * @author <NAME> <<EMAIL>>
 */
class SetEmailTest extends TestCase
{

    private $endpoint = '/users/{id}/email';

    public function testSetUserEmail_()
    {
        $userDetails = [
            'name' => '<NAME>',
        ];

        // get the logged in user (create one if no one is logged in)
        $user = $this->registerAndLoginTestingUser($userDetails);

        $data = [
            'email' => '<EMAIL>',
        ];

        $this->endpoint = str_replace("{id}", $user->id, $this->endpoint);

        // send the HTTP request
        $response = $this->apiCall($this->endpoint, 'post', $data, true);

        // assert response status is correct
        $this->assertEquals($response->getStatusCode(), '202');

    }

}<commit_msg>change the testing email from my personall address to test<commit_after><?php

namespace App\Containers\Email\Tests\Api\Functional;

use App\Kernel\Tests\PHPUnit\Abstracts\TestCase;

/**
 * Class SetEmailTest.
 *
 * @author <NAME> <<EMAIL>>
 */
class SetEmailTest extends TestCase
{

    private $endpoint = '/users/{id}/email';

    public function testSetUserEmail_()
    {
        $userDetails = [
            'name' => '<NAME>',
        ];

        // get the logged in user (create one if no one is logged in)
        $user = $this->registerAndLoginTestingUser($userDetails);

        $data = [
            'email' => '<EMAIL>',
        ];

        $this->endpoint = str_replace("{id}", $user->id, $this->endpoint);

        // send the HTTP request
        $response = $this->apiCall($this->endpoint, 'post', $data, true);

        // assert response status is correct
        $this->assertEquals($response->getStatusCode(), '202');

    }

}
{'fraction_non_alphanumeric': 0.15559157212317667, 'fraction_numerical': 0.0032414910858995136, 'mean_word_length': 2.5209125475285172, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 33, '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': '2889214', 'n_tokens_mistral': 551, 'n_tokens_neox': 537, 'n_words': 131}