mirror of
https://github.com/dg/dibi.git
synced 2025-08-30 09:19:48 +02:00
new directory structure, moved to /src
This commit is contained in:
17
tests/dibi/Translator.DateTimeInterface.phpt
Normal file
17
tests/dibi/Translator.DateTimeInterface.phpt
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @phpversion 5.5
|
||||
*/
|
||||
|
||||
use Tester\Assert;
|
||||
|
||||
require __DIR__ . '/bootstrap.php';
|
||||
|
||||
$conn = new DibiConnection($config);
|
||||
$translator = new DibiTranslator($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));
|
Reference in New Issue
Block a user