TestProcessorGetBlock
Here is the test page for the 'GetBlock' processor.
This processor gets blocks from other pages (or from the current page) and shows the content where the processor block is defined.
Test Data [edit section]
Some data used for these tests is on: SamplePageHere is more data, in the form of normal and hidden blocks on this page:
HereBlock1 this is a non-hidden block, on this page
Test 1 - get block 1 from SamplePage [edit section]
processor block [edit section]
Here is the processor block:{{{#!GetBlock SamplePage:SampleBlock }} }
result output [edit section]
Here is the result from the processor:
This is a block of text that appears in the block: SampleBlock on the page SamplePage. It is not very interesting, but shows how a block can be read directly from a page.
expected result [edit section]
The expected output should be:
This is a block of text that appears in the block: SampleBlock on the page SamplePage. It is not very interesting, but shows how a block can be read directly from a page.
Test 2 - get block 2 from SamplePage [edit section]
processor block [edit section]
Here is the processor block:{{{#!GetBlock SamplePage:SampleBlock2 }} }
result output [edit section]
Here is the result from the processor:
This is another block of text
expected result [edit section]
The expected output should be:
This is another block of text
Test 3 - get non-hidden block from this page [edit section]
processor block [edit section]
Here is the processor block:{{{#!GetBlock :HereBlock1 }} }
result output [edit section]
Here is the result from the processor:
this is a non-hidden block, on this page
expected result [edit section]
The expected output should be:
this is a non-hidden block, on this page
Test 4 - get hidden block from this page [edit section]
processor block [edit section]
Here is the processor block:{{{#!GetBlock :HereBlock2 }} }
result output [edit section]
Here is the result from the processor:
this is a hidden block, on this page
expected result [edit section]
The expected output should be:
this is a hidden block, on this page