'', 'end' => '', 'break' => '
', 'links' => false, 'flowed' => false, 'wrap' => false, 'space' => '_', // replace UTF-8 non-breaking space for simpler testing ); $data[] = array(" aaaa", "_aaaa", $options); $data[] = array("aaaa aaaa", "aaaa_aaaa", $options); $data[] = array("aaaa aaaa", "aaaa__aaaa", $options); $data[] = array("aaaa aaaa", "aaaa___aaaa", $options); $data[] = array("aaaa\taaaa", "aaaa____aaaa", $options); $data[] = array("aaaa\naaaa", "aaaa
aaaa", $options); $data[] = array("aaaa\n aaaa", "aaaa
_aaaa", $options); $data[] = array("aaaa\n aaaa", "aaaa
__aaaa", $options); $data[] = array("aaaa\n aaaa", "aaaa
___aaaa", $options); $data[] = array("\taaaa", "____aaaa", $options); $data[] = array("\naaaa", "
aaaa", $options); $data[] = array("\n aaaa", "
_aaaa", $options); $data[] = array("\n aaaa", "
__aaaa", $options); $data[] = array("\n aaaa", "
___aaaa", $options); $data[] = array("aaaa\n\nbbbb", "aaaa

bbbb", $options); $data[] = array(">aaaa \n>aaaa", "
aaaa_
aaaa
", $options); $data[] = array(">aaaa\n>aaaa", "
aaaa
aaaa
", $options); $data[] = array(">aaaa \n>bbbb\ncccc dddd", "
aaaa_
bbbb
cccc_dddd", $options); $data[] = array("aaaa-bbbb/cccc", "aaaa-⁠bbbb/⁠cccc", $options); $options['flowed'] = true; $data[] = array(" aaaa", "aaaa", $options); $data[] = array("aaaa aaaa", "aaaa_aaaa", $options); $data[] = array("aaaa aaaa", "aaaa__aaaa", $options); $data[] = array("aaaa aaaa", "aaaa___aaaa", $options); $data[] = array("aaaa\taaaa", "aaaa____aaaa", $options); $data[] = array("aaaa\naaaa", "aaaa
aaaa", $options); $data[] = array("aaaa\n aaaa", "aaaa
aaaa", $options); $data[] = array("aaaa\n aaaa", "aaaa
_aaaa", $options); $data[] = array("aaaa\n aaaa", "aaaa
__aaaa", $options); $data[] = array("\taaaa", "____aaaa", $options); $data[] = array("\naaaa", "
aaaa", $options); $data[] = array("\n aaaa", "
aaaa", $options); $data[] = array("\n aaaa", "
_aaaa", $options); $data[] = array("\n aaaa", "
__aaaa", $options); $data[] = array("aaaa\n\nbbbb", "aaaa

bbbb", $options); $data[] = array(">aaaa \n>aaaa", "
aaaa aaaa
", $options); $data[] = array(">aaaa\n>aaaa", "
aaaa
aaaa
", $options); $data[] = array(">aaaa \n>bbbb\ncccc dddd", "
aaaa bbbb
cccc_dddd", $options); $options['flowed'] = false; $options['wrap'] = true; $data[] = array(">>aaaa bbbb\n>>\n>>>\n>cccc\n\ndddd eeee", "
aaaa bbbb


cccc

dddd eeee", $options); $data[] = array("\n>>aaaa\n\ndddd", "
aaaa

dddd", $options); $data[] = array("aaaa\n>bbbb\n>cccc\n\ndddd\n>>test", "aaaa
bbbb
cccc

dddd
test
", $options); return $data; } /** * Test text to html conversion * * @dataProvider data_text2html */ function test_text2html($input, $output, $options) { $t2h = new rcube_text2html($input, false, $options); $html = $t2h->get_html(); $this->assertEquals($output, $html); } }