aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/front
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-05-17 11:29:17 +0200
committerArthurHoaro <arthur@hoa.ro>2020-07-23 21:19:21 +0200
commite3d28be9673a9f8404ff907b8191209729ad690c (patch)
tree545eb94208672c0c0195a4d8d354956c59b8d150 /tests/front
parent07f99432b7b0c75935b758b20a30c3e0007bac13 (diff)
downloadShaarli-e3d28be9673a9f8404ff907b8191209729ad690c.tar.gz
Shaarli-e3d28be9673a9f8404ff907b8191209729ad690c.tar.zst
Shaarli-e3d28be9673a9f8404ff907b8191209729ad690c.zip
Slim daily: minor bugfix with empty data
Diffstat (limited to 'tests/front')
-rw-r--r--tests/front/controller/DailyControllerTest.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/front/controller/DailyControllerTest.php b/tests/front/controller/DailyControllerTest.php
index bb453d5b..2714bfd9 100644
--- a/tests/front/controller/DailyControllerTest.php
+++ b/tests/front/controller/DailyControllerTest.php
@@ -112,6 +112,8 @@ class DailyControllerTest extends TestCase
112 'Daily - '. format_date($currentDay, false, true) .' - Shaarli', 112 'Daily - '. format_date($currentDay, false, true) .' - Shaarli',
113 $assignedVariables['pagetitle'] 113 $assignedVariables['pagetitle']
114 ); 114 );
115 static::assertEquals($currentDay, $assignedVariables['dayDate']);
116 static::assertEquals($currentDay->getTimestamp(), $assignedVariables['day']);
115 static::assertCount(3, $assignedVariables['linksToDisplay']); 117 static::assertCount(3, $assignedVariables['linksToDisplay']);
116 118
117 $link = $assignedVariables['linksToDisplay'][0]; 119 $link = $assignedVariables['linksToDisplay'][0];
@@ -358,6 +360,8 @@ class DailyControllerTest extends TestCase
358 static::assertSame('daily', (string) $result->getBody()); 360 static::assertSame('daily', (string) $result->getBody());
359 static::assertCount(0, $assignedVariables['linksToDisplay']); 361 static::assertCount(0, $assignedVariables['linksToDisplay']);
360 static::assertSame('Today', $assignedVariables['dayDesc']); 362 static::assertSame('Today', $assignedVariables['dayDesc']);
363 static::assertEquals((new \DateTime())->setTime(0, 0)->getTimestamp(), $assignedVariables['day']);
364 static::assertEquals((new \DateTime())->setTime(0, 0), $assignedVariables['dayDate']);
361 } 365 }
362 366
363 protected function createValidContainerMockSet(): void 367 protected function createValidContainerMockSet(): void