Files
XC_VM/tests/Unit/PhpM3u8/Data/Transformer/Iso8601TransformerTest.php
T
Divarion_D 758a9cab0b style: apply K&R + tab formatting across the codebase (make cs-fix)
Mechanical, behaviour-preserving reformat produced by 'make cs-fix' under
the new build/phpcs.xml.dist ruleset: K&R braces, tab indentation, and the
other whitespace normalisations. No logic changes.
2026-09-13 14:14:23 +03:00

23 lines
622 B
PHP

<?php
namespace Chrisyue\PhpM3u8\Test\Data\Transformer;
use Chrisyue\PhpM3u8\Data\Transformer\Iso8601Transformer;
use PHPUnit\Framework\TestCase;
class Iso8601TransformerTest extends TestCase {
public function testFromString(): void {
$string = '2018-01-01T01:02:03.002+08:00';
$this->assertEquals(new \DateTime($string), Iso8601Transformer::fromString($string));
}
public function testToString(): void {
$string = '2018-01-01T01:02:03.002+08:00';
$datetime = new \DateTime($string);
$this->assertEquals($string, Iso8601Transformer::toString($datetime));
}
}