From 4c01909cf865c0b8b4361595482a91864bae8e61 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 11 Jan 2017 08:35:45 +0100 Subject: [PATCH] test/php: simple new tests --- .../Businessprocess/Html/HtmlTagTest.php | 18 +++++++++++++ .../library/Businessprocess/Html/TextTest.php | 25 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 test/php/library/Businessprocess/Html/HtmlTagTest.php create mode 100644 test/php/library/Businessprocess/Html/TextTest.php diff --git a/test/php/library/Businessprocess/Html/HtmlTagTest.php b/test/php/library/Businessprocess/Html/HtmlTagTest.php new file mode 100644 index 0000000..4b24558 --- /dev/null +++ b/test/php/library/Businessprocess/Html/HtmlTagTest.php @@ -0,0 +1,18 @@ +assertEquals( + $h1->render(), + '

Hea & der

' + ); + } +} diff --git a/test/php/library/Businessprocess/Html/TextTest.php b/test/php/library/Businessprocess/Html/TextTest.php new file mode 100644 index 0000000..4970ec6 --- /dev/null +++ b/test/php/library/Businessprocess/Html/TextTest.php @@ -0,0 +1,25 @@ +assertEquals( + 'A & O', + Text::create('A & O')->getText() + ); + } + + public function testTextIsEscapedWhenRendered() + { + $this->assertEquals( + 'A & O', + Text::create('A & O')->render() + ); + } +}