<commit_before><?php
/**
 * This file is part of the login-cidadao project or it's bundles.
 *
 * (c) <NAME> <guilhermednt on github>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace LoginCidadao\OAuthBundle\Tests\Entity;

use LoginCidadao\OAuthBundle\Entity\AccessToken;
use PHPUnit\Framework\TestCase;

class AccessTokenTest extends TestCase
{
    /**
     * @group time-sensitive
     */
    public function testEntity()
    {
        $idToken = 'id_token';

        $accessToken = new AccessToken();
        $accessToken
            ->setIdToken($idToken)
            ->setCreatedAtValue();

        $this->assertFalse($accessToken->hasExpired());

        $accessToken->setExpired();
        sleep(2);

        $this->assertEquals($idToken, $accessToken->getIdToken());
        $this->assertTrue($accessToken->hasExpired());
        $this->assertInstanceOf('\DateTime', $accessToken->getCreatedAt());
    }
}
<commit_msg>this test broke for no reason PROCERGS#785<commit_after><?php
/**
 * This file is part of the login-cidadao project or it's bundles.
 *
 * (c) <NAME> <guilhermednt on github>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace LoginCidadao\OAuthBundle\Tests\Entity;

use LoginCidadao\OAuthBundle\Entity\AccessToken;
use PHPUnit\Framework\TestCase;

class AccessTokenTest extends TestCase
{
    /**
     * @group time-sensitive
     */
    public function testEntity()
    {
        $idToken = 'id_token';

        $accessToken = new AccessToken();
        $accessToken
            ->setIdToken($idToken)
            ->setCreatedAtValue();

        $this->assertFalse($accessToken->hasExpired());

        $accessToken->setExpired();
        sleep(3);

        $this->assertEquals($idToken, $accessToken->getIdToken());
        $this->assertTrue($accessToken->hasExpired());
        $this->assertInstanceOf('\DateTime', $accessToken->getCreatedAt());
    }
}

{'fraction_non_alphanumeric': 0.1278340569223348, 'fraction_numerical': 0.00241196333815726, 'mean_word_length': 3.1232604373757455, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 29, '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': '3401076', 'n_tokens_mistral': 606, 'n_tokens_neox': 596, 'n_words': 140}