Inital implementation of image listing
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user