Inital implementation of image listing

This commit is contained in:
2026-01-05 10:49:00 +01:00
parent fe8d0bbffb
commit 9a067eca16
5 changed files with 390 additions and 128 deletions

View File

@@ -192,4 +192,25 @@ class plugin_filetools_test extends DokuWikiTest
$this->structureCheck($doc, $structure);
}
/**
* This function checks that the images syntax renders a thumbnail gallery.
*/
public function test_images_gallery()
{
$instructions = p_get_instructions('{{images>' . TMP_DIR . '/filelistdata/*&direct=1}}');
$xhtml = p_render('xhtml', $instructions, $info);
$doc = new Document();
$doc->html($xhtml);
$structure = [
'div.filetools-plugin.filetools-gallery' => 1,
'div.filetools-plugin.filetools-gallery a' => 1,
'div.filetools-plugin.filetools-gallery img' => 1,
];
$this->structureCheck($doc, $structure);
$this->assertStringContainsString('exampleimage.png', $xhtml);
}
}