NotificationTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 2
Bugs 2 Features 1
Metric Value
eloc 9
c 2
b 2
f 1
dl 0
loc 16
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testSetCreated() 0 14 1
1
<?php
2
3
namespace Azine\EmailBundle\Tests\Entity;
4
5
use Azine\EmailBundle\Entity\Notification;
6
7
class NotificationTest extends \PHPUnit\Framework\TestCase
8
{
9
    public function testSetCreated()
10
    {
11
        $n = new Notification();
12
        $c1 = $n->getCreated();
13
14
        $n->setCreatedValue();
15
16
        $c2 = $n->getCreated();
17
18
        sleep(1);
19
20
        $this->assertNull($c1);
21
        $this->assertNotNull($c2);
22
        $this->assertGreaterThanOrEqual($c2, new \DateTime());
23
    }
24
}
25