mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-06 12:02:32 +02:00
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.
23 lines
622 B
PHP
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));
|
|
}
|
|
}
|