\s*(.*?)\s*<\/div>/s', $xhtml, $xmlMatch);
$decodedXml = base64_decode(trim($xmlMatch[1]), true);
$this->assertNotFalse($decodedXml);
$this->assertStringContainsString('Approve Order', $decodedXml);
preg_match('/
\s*(.*?)\s*<\/div>/s', $xhtml, $linkMatch);
$decodedLinks = base64_decode(trim($linkMatch[1]), true);
$this->assertSame('[]', $decodedLinks);
}
/**
* Test the handle method directly for ENTER state
*/
public function test_handle_enter_state()
{
$plugin = plugin_load('syntax', 'bpmnio_bpmnio');
$this->assertNotNull($plugin, 'Plugin should be loadable');
$handler = new Doku_Handler();
$result = $plugin->handle('', DOKU_LEXER_ENTER, 0, $handler);
$this->assertEquals(DOKU_LEXER_ENTER, $result[0]);
$this->assertEquals('bpmn', $result[1]);
}
/**
* Test the handle method directly for EXIT state
*/
public function test_handle_exit_state()
{
$plugin = plugin_load('syntax', 'bpmnio_bpmnio');
$handler = new Doku_Handler();
$result = $plugin->handle('', DOKU_LEXER_EXIT, 0, $handler);
$this->assertEquals(DOKU_LEXER_EXIT, $result[0]);
}
/**
* Test that the plugin is correctly registered
*/
public function test_plugin_registration()
{
$plugin = plugin_load('syntax', 'bpmnio_bpmnio');
$this->assertNotNull($plugin, 'Plugin should be loadable');
$this->assertEquals('block', $plugin->getPType());
$this->assertEquals('protected', $plugin->getType());
$this->assertEquals(0, $plugin->getSort());
}
}