From b37954110d2184279a7f400d8750996a27b8f666 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 5 Feb 2014 20:18:51 +0100 Subject: Bring back unit tests (they should be removed when creating a package) --- tests/Framework/Html.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 tests/Framework/Html.php (limited to 'tests/Framework/Html.php') diff --git a/tests/Framework/Html.php b/tests/Framework/Html.php new file mode 100644 index 000000000..60284deef --- /dev/null +++ b/tests/Framework/Html.php @@ -0,0 +1,45 @@ +assertInstanceOf('html', $object, "Class constructor"); + } + + /** + * Data for test_quote() + */ + function data_quote() + { + return array( + array('abc', 'abc'), + array('?', '?'), + array('"', '"'), + array('<', '<'), + array('>', '>'), + array('&', '&'), + array('&', '&amp;'), + ); + } + + /** + * Test for quote() + * @dataProvider data_quote + */ + function test_quote($str, $result) + { + $this->assertEquals(html::quote($str), $result); + } +} -- cgit v1.2.3