UT: fix formatting issue when the current day has a single digit
This commit is contained in:
parent
dff039092d
commit
b862705947
2 changed files with 3 additions and 3 deletions
|
@ -327,7 +327,7 @@ public function testValidIndexControllerInvokeNoBookmark(): void
|
||||||
static::assertSame(200, $result->getStatusCode());
|
static::assertSame(200, $result->getStatusCode());
|
||||||
static::assertSame('daily', (string) $result->getBody());
|
static::assertSame('daily', (string) $result->getBody());
|
||||||
static::assertCount(0, $assignedVariables['linksToDisplay']);
|
static::assertCount(0, $assignedVariables['linksToDisplay']);
|
||||||
static::assertSame('Today - ' . (new \DateTime())->format('F d, Y'), $assignedVariables['dayDesc']);
|
static::assertSame('Today - ' . (new \DateTime())->format('F j, Y'), $assignedVariables['dayDesc']);
|
||||||
static::assertEquals((new \DateTime())->setTime(0, 0)->getTimestamp(), $assignedVariables['day']);
|
static::assertEquals((new \DateTime())->setTime(0, 0)->getTimestamp(), $assignedVariables['day']);
|
||||||
static::assertEquals((new \DateTime())->setTime(0, 0), $assignedVariables['dayDate']);
|
static::assertEquals((new \DateTime())->setTime(0, 0), $assignedVariables['dayDate']);
|
||||||
}
|
}
|
||||||
|
|
|
@ -240,8 +240,8 @@ public function getEndDatesByType(): array
|
||||||
public function getDescriptionsByType(): array
|
public function getDescriptionsByType(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
[DailyPageHelper::DAY, $date = new \DateTimeImmutable(), 'Today - ' . $date->format('F d, Y')],
|
[DailyPageHelper::DAY, $date = new \DateTimeImmutable(), 'Today - ' . $date->format('F j, Y')],
|
||||||
[DailyPageHelper::DAY, $date = new \DateTimeImmutable('-1 day'), 'Yesterday - ' . $date->format('F d, Y')],
|
[DailyPageHelper::DAY, $date = new \DateTimeImmutable('-1 day'), 'Yesterday - ' . $date->format('F j, Y')],
|
||||||
[DailyPageHelper::DAY, new \DateTimeImmutable('2020-10-09 04:05:06'), 'October 9, 2020'],
|
[DailyPageHelper::DAY, new \DateTimeImmutable('2020-10-09 04:05:06'), 'October 9, 2020'],
|
||||||
[DailyPageHelper::WEEK, new \DateTimeImmutable('2020-10-09 04:05:06'), 'Week 41 (October 5, 2020)'],
|
[DailyPageHelper::WEEK, new \DateTimeImmutable('2020-10-09 04:05:06'), 'Week 41 (October 5, 2020)'],
|
||||||
[DailyPageHelper::MONTH, new \DateTimeImmutable('2020-10-09 04:05:06'), 'October, 2020'],
|
[DailyPageHelper::MONTH, new \DateTimeImmutable('2020-10-09 04:05:06'), 'October, 2020'],
|
||||||
|
|
Loading…
Reference in a new issue