mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-17 19:36:33 +02:00
Test fixes
This commit is contained in:
@@ -25,4 +25,8 @@
|
||||
<listeners>
|
||||
<listener class="JohnKary\PHPUnit\Listener\SpeedTrapListener" />
|
||||
</listeners>
|
||||
|
||||
<php>
|
||||
<server name="HTTP_HOST" value="localhost"/>
|
||||
</php>
|
||||
</phpunit>
|
||||
|
@@ -29,8 +29,8 @@ class TwigFactoryTest extends TestCase
|
||||
$twig = (new TwigFactory($this->config, $callableResolver))();
|
||||
|
||||
$this->assertInstanceOf(
|
||||
ViewFunctions\Asset::class,
|
||||
$twig->getEnvironment()->getFunction('asset')->getCallable()
|
||||
ViewFunctions\Analytics::class,
|
||||
$twig->getEnvironment()->getFunction('analytics')->getCallable()
|
||||
);
|
||||
|
||||
$this->assertInstanceOf(
|
||||
@@ -58,6 +58,11 @@ class TwigFactoryTest extends TestCase
|
||||
$twig->getEnvironment()->getFunction('markdown')->getCallable()
|
||||
);
|
||||
|
||||
$this->assertInstanceOf(
|
||||
ViewFunctions\ModifiedTime::class,
|
||||
$twig->getEnvironment()->getFunction('modified_time')->getCallable()
|
||||
);
|
||||
|
||||
$this->assertInstanceOf(
|
||||
ViewFunctions\ParentUrl::class,
|
||||
$twig->getEnvironment()->getFunction('parent_url')->getCallable()
|
||||
@@ -78,6 +83,11 @@ class TwigFactoryTest extends TestCase
|
||||
$twig->getEnvironment()->getFunction('url')->getCallable()
|
||||
);
|
||||
|
||||
$this->assertInstanceOf(
|
||||
ViewFunctions\Vite::class,
|
||||
$twig->getEnvironment()->getFunction('vite')->getCallable()
|
||||
);
|
||||
|
||||
$this->assertInstanceOf(
|
||||
ViewFunctions\ZipUrl::class,
|
||||
$twig->getEnvironment()->getFunction('zip_url')->getCallable()
|
||||
|
@@ -11,10 +11,10 @@ class MarkdownTest extends TestCase
|
||||
{
|
||||
public function test_it_can_parse_markdown_into_html(): void
|
||||
{
|
||||
$markdown = new Markdown(new ParsedownExtra, $this->cache);
|
||||
$markdown = $this->container->get(Markdown::class);
|
||||
|
||||
$this->assertEquals(
|
||||
'<p><strong>Test</strong> <code>markdown</code>, <del>please</del> <em>ignore</em></p>',
|
||||
"<p><strong>Test</strong> <code>markdown</code>, <del>please</del> <em>ignore</em></p>\n",
|
||||
$markdown('**Test** `markdown`, ~~please~~ _ignore_')
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user