1
0
mirror of https://github.com/dg/dibi.git synced 2025-02-23 10:26:21 +01:00
php-dibi/tests/dibi/Translator.DateTimeInterface.phpt
David Grudl 2e09a559f2 moved to namespace Dibi
added loader for old class names
2015-10-09 12:20:14 +02:00

18 lines
450 B
PHP

<?php
/**
* @phpversion 5.5
*/
use Tester\Assert;
require __DIR__ . '/bootstrap.php';
$conn = new Dibi\Connection($config);
$translator = new Dibi\Translator($conn);
$datetime = new DateTime('1978-01-23 00:00:00');
Assert::equal($datetime->format('U'), $translator->formatValue(new DateTime($datetime->format('c')), NULL));
Assert::equal($datetime->format('U'), $translator->formatValue(new DateTimeImmutable($datetime->format('c')), NULL));