From 0fa54df638a0b0f514d1bfba3cefb93e38991a35 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 1 Dec 2012 20:02:34 +0100 Subject: enriched.inc -> rcube_enriched --- tests/Framework/Enriched.php | 74 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 tests/Framework/Enriched.php (limited to 'tests/Framework/Enriched.php') diff --git a/tests/Framework/Enriched.php b/tests/Framework/Enriched.php new file mode 100644 index 000000000..26bbc3b4e --- /dev/null +++ b/tests/Framework/Enriched.php @@ -0,0 +1,74 @@ +assertInstanceOf('rcube_enriched', $object, "Class constructor"); + } + + /** + * Test to_html() + */ + function test_to_html() + { + $enriched = 'the-text'; + $expected = 'the-text'; + $result = rcube_enriched::to_html($enriched); + + $this->assertSame($expected, $result); + } + + /** + * Data for test_formatting() + */ + function data_formatting() + { + return array( + array('', ''), + array('', ''), + array('', ''), + array('', ''), + array('', ''), + array('', ''), + array('', ''), + array('', ''), + array('', ''), + array('', ''), + array('', ''), + array('', ''), + array('', ''), + array('', ''), + array('', ''), + array('', ''), + array('', ''), + array('', ''), + array('', ''), + array('', ''), + array('', ''), + array('', ''), + ); + } + + /** + * Test formatting conversion + * @dataProvider data_formatting + */ + function test_formatting($enriched, $expected) + { + $result = rcube_enriched::to_html($enriched); + + $this->assertSame($expected, $result); + } +} -- cgit v1.2.3