for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Azine\EmailBundle\Tests\Entity;
use Azine\EmailBundle\Entity\Notification;
class NotificationTest extends \PHPUnit\Framework\TestCase
{
public function testSetCreated()
$n = new Notification();
$c1 = $n->getCreated();
$n->setCreatedValue();
$c2 = $n->getCreated();
sleep(1);
$this->assertNull($c1);
$this->assertNotNull($c2);
$this->assertGreaterThanOrEqual($c2, new \DateTime());
}