logseq2gemtext/tests/GemlogRenderTest.php

24 lines
625 B
PHP

<?php
declare(strict_types=1);
namespace LogseqGem\Tests;
use PHPUnit\Framework\TestCase;
use LogseqGem\GemlogRender;
class GemlogRenderTest extends TestCase {
public function testRender() {
$render = new GemlogRender;
$render->addArticle('second', '2021-01-01', 'foo.gmi');
$render->addArticle('third', '2020-01-01', 'old.gmi');
$render->addArticle('first', '2022-01-01', 'new.gmi');
$this->assertStringContainsString(<<<EOF
=> new.gmi 2022-01-01 first
=> foo.gmi 2021-01-01 second
=> old.gmi 2020-01-01 third
EOF, $render->render());
}
}