mirror of
https://github.com/dwaxweiler/connector-mobilizon
synced 2025-06-05 21:59:25 +02:00
wip
This commit is contained in:
17
tests/LocalDateTimeFormatterTest.php
Normal file
17
tests/LocalDateTimeFormatterTest.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use MobilizonConnector\LocalDateTime;
|
||||
use MobilizonConnector\LocalDateTimeFormatter;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
final class LocalDateTimeFormatterTest extends TestCase
|
||||
{
|
||||
public function testCanFormatDate(): void {
|
||||
$this->assertSame('15 April 2021', LocalDateTimeFormatter::format(new LocalDateTime('2021-04-15T10:30:00Z', new DateTimeZone("utc")), 'j F Y'));
|
||||
}
|
||||
|
||||
public function testCanFormatTime(): void {
|
||||
$this->assertSame('10:30', LocalDateTimeFormatter::format(new LocalDateTime('2021-04-15T10:30:00Z', new DateTimeZone("utc")), 'H:i'));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user