Add the Chronological

This commit is contained in:
2026-02-16 13:39:26 +01:00
parent c091ed1371
commit f1ac693fe8
162 changed files with 25868 additions and 1 deletions

View File

@@ -0,0 +1,37 @@
<?php
namespace dokuwiki\plugin\luxtools\test;
use dokuwiki\plugin\luxtools\ChronologicalDayTemplate;
use DokuWikiTest;
require_once(__DIR__ . '/../autoload.php');
/**
* Tests for German day template generation.
*
* @group plugin_luxtools
* @group plugins
*/
class ChronologicalDayTemplateTest extends DokuWikiTest
{
public function testBuildForDayIdGermanHeading(): void
{
$tpl = ChronologicalDayTemplate::buildForDayId('chronological:2026:02:13');
if (!is_string($tpl) || $tpl === '') {
throw new \Exception('Expected non-empty day template');
}
if (strpos($tpl, '====== Freitag, 13. Februar 2026 ======') === false) {
throw new \Exception('Expected German formatted heading not found');
}
}
public function testBuildForDayIdRejectsInvalid(): void
{
$tpl = ChronologicalDayTemplate::buildForDayId('chronological:2026:02');
if ($tpl !== null) {
throw new \Exception('Expected null for non-day ID');
}
}
}