<commit_before><?php
/**
 * Created by PhpStorm.
 * User: cezar
 * Date: 13/03/17
 * Time: 21:11
 */

namespace ApplicationTest\Entity;

use Application\Entity\Entity;
use Application\Entity\UserEntity;
use Application\Interfaces\UserEntityInterface;
use PHPUnit\Framework\TestCase;
use Application\Entity\UserEntity as User;

/**
 * Class UserTest
 * @package ApplicationTest\Entity
 * @group Entities
 */

class UserTest extends TestCase
{

    public function testImplements()
    {
        $user = new UserEntity();
        $this->assertInstanceOf(UserEntityInterface::class, $user);
    }

    public function testInherit()
    {
        $user = new UserEntity();
        $this->assertInstanceOf(
            Entity::class,
            $user
        );
    }

    public function testAmountAttributes()
    {
        $arrayCopy = (new User())->getArrayCopy();
        $this->assertEquals(7, count($arrayCopy));

        return $arrayCopy;
    }

    /**
     * @depends testAmountAttributes
     */
    public function testNamesAttributes($arrayCopy)
    {
        $this->assertArrayHasKey('id', $arrayCopy);
        $this->assertArrayHasKey('name', $arrayCopy);
        $this->assertArrayHasKey('email', $arrayCopy);
        $this->assertArrayHasKey('password', $arrayCopy);
        $this->assertArrayHasKey('birthDate', $arrayCopy);
        $this->assertArrayHasKey('typeAuth', $arrayCopy);
        $this->assertArrayHasKey('university', $arrayCopy);
    }
}<commit_msg>Modificação do teste User: remoção do atributo birthDate e alterado a quantidade de atributos esperados para o teste.<commit_after><?php
/**
 * Created by PhpStorm.
 * User: cezar
 * Date: 13/03/17
 * Time: 21:11
 */

namespace ApplicationTest\Entity;

use Application\Entity\Entity;
use Application\Entity\UserEntity;
use Application\Interfaces\UserEntityInterface;
use PHPUnit\Framework\TestCase;
use Application\Entity\UserEntity as User;

/**
 * Class UserTest
 * @package ApplicationTest\Entity
 * @group Entities
 */

class UserTest extends TestCase
{

    public function testImplements()
    {
        $user = new UserEntity();
        $this->assertInstanceOf(UserEntityInterface::class, $user);
    }

    public function testInherit()
    {
        $user = new UserEntity();
        $this->assertInstanceOf(
            Entity::class,
            $user
        );
    }

    public function testAmountAttributes()
    {
        $arrayCopy = (new User())->getArrayCopy();
        $this->assertEquals(6, count($arrayCopy));

        return $arrayCopy;
    }

    /**
     * @depends testAmountAttributes
     */
    public function testNamesAttributes($arrayCopy)
    {
        $this->assertArrayHasKey('id', $arrayCopy);
        $this->assertArrayHasKey('name', $arrayCopy);
        $this->assertArrayHasKey('email', $arrayCopy);
        $this->assertArrayHasKey('password', $arrayCopy);
        $this->assertArrayHasKey('typeAuth', $arrayCopy);
        $this->assertArrayHasKey('university', $arrayCopy);
    }
}
{'fraction_non_alphanumeric': 0.12937645881960655, 'fraction_numerical': 0.007335778592864288, 'mean_word_length': 3.087193460490463, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 24, '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': '6877781', 'n_tokens_mistral': 885, 'n_tokens_neox': 858, 'n_words': 175}