[icinga-checkins] icinga.org: icingaweb2/master: Add regression test for bug #11796

git at icinga.org git at icinga.org
Thu Jun 2 17:58:35 CEST 2016


Module: icingaweb2
Branch: master
Commit: 53d8278877a804cdc5a6fa5fe3ed26d831220505
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=53d8278877a804cdc5a6fa5fe3ed26d831220505

Author: Alexander A. Klimov <alexander.klimov at netways.de>
Date:   Fri May 20 10:06:22 2016 +0200

Add regression test for bug #11796

---

 .../test/php/regression/Bug11796Test.php           |   27 ++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/modules/monitoring/test/php/regression/Bug11796Test.php b/modules/monitoring/test/php/regression/Bug11796Test.php
new file mode 100644
index 0000000..f024334
--- /dev/null
+++ b/modules/monitoring/test/php/regression/Bug11796Test.php
@@ -0,0 +1,27 @@
+<?php
+/* Icinga Web 2 | (c) 2016 Icinga Development Team | GPLv2+ */
+
+namespace Tests\Icinga\Module\Monitoring\Regression;
+
+require_once __DIR__ . '/../../../application/views/helpers/PluginOutput.php';
+
+use Icinga\Test\BaseTestCase;
+use Zend_View_Helper_PluginOutput;
+
+/**
+ * Regression-Test for bug #11796
+ *
+ * Plugin output renderer must not destroy links by adding zero width space characters.
+ *
+ * @see https://dev.icinga.org/issues/11796
+ */
+class Bug11796Test extends BaseTestCase
+{
+    public function testWhetherZeroWidthSpaceDoesntDestroyLinksInPluginOutput()
+    {
+        $helper = new Zend_View_Helper_PluginOutput();
+        $this->assertTrue(
+            strpos($helper->pluginOutput('<a href="http://example.com">EXAMPLE.COM', true), 'example.com') !== false
+        );
+    }
+}



More information about the icinga-checkins mailing list