2021-07-22 21:44:45 +00:00
|
|
|
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace OCA\GPodderSync\Tests\Unit\Core\EpisodeAction;
|
|
|
|
|
|
|
|
use Test\TestCase;
|
|
|
|
|
|
|
|
class EpisodeActionRequestTimestampConversionTest extends TestCase
|
|
|
|
{
|
2021-10-05 13:43:55 +00:00
|
|
|
public function testDateTimeFormatIsEnsured(): void
|
2021-07-22 21:44:45 +00:00
|
|
|
{
|
2021-10-05 13:43:55 +00:00
|
|
|
$episodeActionTimestamp = "2021-05-18T23:45:11";
|
|
|
|
$datetime = \DateTime::createFromFormat('Y-m-d\TH:i:s', $episodeActionTimestamp)
|
|
|
|
->format('Y-m-d\TH:i:s');
|
|
|
|
$this->assertEquals($episodeActionTimestamp, $datetime);
|
2021-07-22 21:44:45 +00:00
|
|
|
}
|
2021-10-05 13:43:55 +00:00
|
|
|
|
2021-07-22 21:44:45 +00:00
|
|
|
}
|