use PHPUnit\Framework\TestCase;
use Symfony\Component\Mime\Header\DateHeader;
class DateHeaderTest extends TestCase
{ /* --
The following tests refer to RFC 2822, section 3.6.1 and 3.3.
*/
public function testGetDateTime() { $header =
new DateHeader('Date',
$dateTime =
new \
DateTimeImmutable());
$this->
assertEquals($dateTime,
$header->
getDateTime());
} public function testDateTimeCanBeSetBySetter() { $header =
new DateHeader('Date',
new \
DateTimeImmutable());
$header->
setDateTime($dateTime =
new \
DateTimeImmutable());
$this->
assertEquals($dateTime,
$header->
getDateTime());
} public function testDateTimeIsConvertedToImmutable() {