Failed Conditions
Pull Request — master (#790)
by Guilherme
18:22 queued 13:16
created

NfgProfileTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 21
ccs 0
cts 15
cp 0
rs 10
c 0
b 0
f 0
wmc 2
1
<?php
2
/**
3
 * This file is part of the login-cidadao project or it's bundles.
4
 *
5
 * (c) Guilherme Donato <guilhermednt on github>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace PROCERGS\LoginCidadao\NfgBundle\Tests\Entity;
12
13
use PHPUnit\Framework\TestCase;
14
use PROCERGS\LoginCidadao\NfgBundle\Entity\NfgProfile;
15
16
class NfgProfileTest extends TestCase
17
{
18
    public function testUpdatedAt()
19
    {
20
        $nfgProfile = new NfgProfile();
21
        $nfgProfile->setUpdatedAt();
22
23
        $this->assertEquals(date('Y-m-d H:i:s'), $nfgProfile->getUpdatedAt()->format('Y-m-d H:i:s'));
24
25
        $date = $nfgProfile->getUpdatedAt();
26
        $nfgProfile->setUpdatedAt($date);
27
        $this->assertEquals($date, $nfgProfile->getUpdatedAt());
28
    }
29
30
    public function testId()
31
    {
32
        $id = rand(42, 9999);
33
        $nfgProfile = new NfgProfile();
34
        $nfgProfile->setId($id);
35
36
        $this->assertEquals($id, $nfgProfile->getId());
37
    }
38
}
39