Clean up unused syntax
This commit is contained in:
@@ -71,13 +71,14 @@ class plugin_luxtools_test extends DokuWikiTest
|
||||
|
||||
/**
|
||||
* This function checks that all files are listed in not recursive mode.
|
||||
* Uses {{files>...}} syntax for backwards compatibility (now handled by directory syntax).
|
||||
*/
|
||||
public function test_not_recursive()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
// Render filelist
|
||||
$instructions = p_get_instructions('{{files>' . TMP_DIR . '/filelistdata/*&style=list&direct=1}}');
|
||||
// Render filelist using files syntax (now handled by directory plugin)
|
||||
$instructions = p_get_instructions('{{files>' . TMP_DIR . '/filelistdata/*&direct=1}}');
|
||||
$xhtml = p_render('xhtml', $instructions, $info);
|
||||
|
||||
// We should find:
|
||||
@@ -91,11 +92,12 @@ class plugin_luxtools_test extends DokuWikiTest
|
||||
|
||||
/**
|
||||
* This function checks that all files are listed in recursive mode.
|
||||
* Uses {{files>...}} syntax for backwards compatibility (now handled by directory syntax).
|
||||
*/
|
||||
public function test_recursive()
|
||||
{
|
||||
// Render filelist
|
||||
$instructions = p_get_instructions('{{files>' . TMP_DIR . '/filelistdata/*&style=list&direct=1&recursive=1}}');
|
||||
// Render filelist using files syntax (now handled by directory plugin)
|
||||
$instructions = p_get_instructions('{{files>' . TMP_DIR . '/filelistdata/*&direct=1&recursive=1}}');
|
||||
$xhtml = p_render('xhtml', $instructions, $info);
|
||||
|
||||
// We should find:
|
||||
@@ -114,54 +116,46 @@ class plugin_luxtools_test extends DokuWikiTest
|
||||
}
|
||||
|
||||
/**
|
||||
* This function checks that the unordered list mode
|
||||
* generates the expected XHTML structure.
|
||||
* This function checks the rendering when style=list is explicitly specified.
|
||||
* Note: The files syntax is now handled by directory syntax and always renders as table.
|
||||
* This test is kept for backwards compatibility testing but expects table structure.
|
||||
*/
|
||||
public function testUnorderedList()
|
||||
{
|
||||
// Render filelist
|
||||
// Render filelist with explicit style=list (now ignored, renders as table)
|
||||
$instructions = p_get_instructions('{{files>' . TMP_DIR . '/filelistdata/*&style=list&direct=1&recursive=1}}');
|
||||
$xhtml = p_render('xhtml', $instructions, $info);
|
||||
|
||||
$doc = new Document();
|
||||
$doc->html($xhtml);
|
||||
|
||||
// Now renders as a table instead of list
|
||||
$structure = [
|
||||
'div.luxtools-plugin' => 1,
|
||||
'div.luxtools-plugin > ul' => 1,
|
||||
'div.luxtools-plugin > ul > li' => 3,
|
||||
'div.luxtools-plugin > ul > li:nth-child(1)' => 1,
|
||||
'div.luxtools-plugin > ul > li:nth-child(1) a' => 'example.txt',
|
||||
'div.luxtools-plugin > ul > li:nth-child(2) ul' => 1,
|
||||
'div.luxtools-plugin > ul > li:nth-child(2) ul > li' => 1,
|
||||
'div.luxtools-plugin > ul > li:nth-child(2) ul > li a' => 'example2.txt',
|
||||
'div.luxtools-plugin table' => 1,
|
||||
];
|
||||
|
||||
$this->structureCheck($doc, $structure);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function checks that the ordered list mode
|
||||
* generates the expected XHTML structure.
|
||||
* This function checks the rendering when style=olist is explicitly specified.
|
||||
* Note: The files syntax is now handled by directory syntax and always renders as table.
|
||||
* This test is kept for backwards compatibility testing but expects table structure.
|
||||
*/
|
||||
public function testOrderedList()
|
||||
{
|
||||
// Render filelist
|
||||
// Render filelist with explicit style=olist (now ignored, renders as table)
|
||||
$instructions = p_get_instructions('{{files>' . TMP_DIR . '/filelistdata/*&style=olist&direct=1&recursive=1}}');
|
||||
$xhtml = p_render('xhtml', $instructions, $info);
|
||||
|
||||
$doc = new Document();
|
||||
$doc->html($xhtml);
|
||||
|
||||
// Now renders as a table instead of ordered list
|
||||
$structure = [
|
||||
'div.luxtools-plugin' => 1,
|
||||
'div.luxtools-plugin > ol' => 1,
|
||||
'div.luxtools-plugin > ol > li' => 3,
|
||||
'div.luxtools-plugin > ol > li:nth-child(1)' => 1,
|
||||
'div.luxtools-plugin > ol > li:nth-child(1) a' => 'example.txt',
|
||||
'div.luxtools-plugin > ol > li:nth-child(2) ol' => 1,
|
||||
'div.luxtools-plugin > ol > li:nth-child(2) ol > li' => 1,
|
||||
'div.luxtools-plugin > ol > li:nth-child(2) ol > li a' => 'example2.txt',
|
||||
'div.luxtools-plugin table' => 1,
|
||||
];
|
||||
|
||||
$this->structureCheck($doc, $structure);
|
||||
|
||||
Reference in New Issue
Block a user