Inial implementation for folder opening
This commit is contained in:
@@ -213,4 +213,24 @@ class plugin_filetools_test extends DokuWikiTest
|
||||
|
||||
$this->assertStringContainsString('exampleimage.png', $xhtml);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function checks that the open syntax renders an inline button.
|
||||
*/
|
||||
public function test_open_button()
|
||||
{
|
||||
$instructions = p_get_instructions('{{open>/tmp/somewhere|Open here}}');
|
||||
$xhtml = p_render('xhtml', $instructions, $info);
|
||||
|
||||
$doc = new Document();
|
||||
$doc->html($xhtml);
|
||||
|
||||
$structure = [
|
||||
'button.filetools-open' => 1,
|
||||
];
|
||||
$this->structureCheck($doc, $structure);
|
||||
|
||||
$this->assertStringContainsString('Open here', $xhtml);
|
||||
$this->assertStringContainsString('data-path="/tmp/somewhere"', $xhtml);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user