You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
546 B
24 lines
546 B
3 years ago
|
<?php
|
||
|
|
||
|
namespace Rinsvent\DTO2Data\Tests\Converter;
|
||
|
|
||
|
use Rinsvent\Transformer\Transformer;
|
||
|
|
||
|
class DateTimeFormatTransformTest extends \Codeception\Test\Unit
|
||
|
{
|
||
|
/**
|
||
|
* @var \UnitTester
|
||
|
*/
|
||
|
protected $tester;
|
||
|
|
||
|
// tests
|
||
|
public function testSuccessFillRequestData()
|
||
|
{
|
||
|
$t = new Transformer();
|
||
|
$dt = new \DateTime('2022-04-01');
|
||
|
$dt->setTime(5, 23, 21);
|
||
|
$actual = $t->transform($dt, new Transformer\DateTimeFormat());
|
||
|
$this->assertEquals('2022-04-01T05:23:21+00:00', $actual);
|
||
|
}
|
||
|
}
|