namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer;
use Symfony\Component\Form\Exception\TransformationFailedException;
use Symfony\Component\Form\Extension\Core\DataTransformer\BaseDateTimeTransformer;
use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer;
class DateTimeToTimestampTransformerTest extends BaseDateTimeTransformerTestCase
{ public function testTransform() { $transformer =
new DateTimeToTimestampTransformer('UTC', 'UTC'
);
$input =
new \
DateTime('2010-02-03 04:05:06 UTC'
);
$output =
$input->
format('U'
);
$this->
assertEquals($output,
$transformer->
transform($input));
} public function testTransformEmpty() { $transformer =
new DateTimeToTimestampTransformer();