[Pkg-nagios-changes] [pkg-icingaweb2] 04/05: Test php-htmlpurifier loading, allow from version 4.3
Markus Frosch
lazyfrosch at moszumanska.debian.org
Mon Feb 22 11:47:37 UTC 2016
This is an automated email from the git hooks/post-receive script.
lazyfrosch pushed a commit to branch test
in repository pkg-icingaweb2.
commit a0ef32ab7eb50c837256f63f776ceadc5c164845
Author: Markus Frosch <markus at lazyfrosch.de>
Date: Mon Feb 22 12:45:52 2016 +0100
Test php-htmlpurifier loading, allow from version 4.3
---
debian/control | 5 +++--
debian/rules | 5 +++++
debian/test/php-htmlpurifier.php | 16 ++++++++++++++++
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/debian/control b/debian/control
index 1cacb80..7957a7d 100644
--- a/debian/control
+++ b/debian/control
@@ -6,6 +6,8 @@ Uploaders:
Markus Frosch <lazyfrosch at debian.org>
Build-Depends:
debhelper (>= 9),
+ php5-cli,
+ php-htmlpurifier (>= 4.3),
yui-compressor
Standards-Version: 3.9.6
Homepage: https://www.icinga.org
@@ -16,8 +18,7 @@ Package: icingaweb2
Architecture: all
Depends:
icingaweb2-common (= ${source:Version}),
-# 4.4 in wheezy - TODO: test
- php-htmlpurifier (>= 4.4),
+ php-htmlpurifier (>= 4.3),
php-dompdf (>= 0.6.1),
# php-parsedown,
# php-lessphp,
diff --git a/debian/rules b/debian/rules
index 5da271e..3c97cfe 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,6 +12,11 @@ override_dh_install:
dh_install -X.min.js -X.min.map -XSOURCE
cp -r debian/minify/*.min.js debian/icingaweb2/usr/share/icingaweb2/public/js/vendor/
+override_dh_auto_test:
+ dh_auto_test
+ # test if php-htmlpurifier can be loaded
+ php debian/test/php-htmlpurifier.php
+
override_dh_auto_build:
dh_auto_build
mkdir debian/minify
diff --git a/debian/test/php-htmlpurifier.php b/debian/test/php-htmlpurifier.php
new file mode 100644
index 0000000..de721d2
--- /dev/null
+++ b/debian/test/php-htmlpurifier.php
@@ -0,0 +1,16 @@
+<?php
+
+require_once 'HTMLPurifier/Bootstrap.php';
+require_once 'HTMLPurifier.php';
+require_once 'HTMLPurifier.autoload.php';
+
+$config = HTMLPurifier_Config::createDefault();
+$config->set('Core.EscapeNonASCIICharacters', true);
+$config->set('HTML.Allowed', 'p,br,b,a[href],i,table,tr,td[colspan],div[class]');
+
+if (assert(get_class($config) == 'HTMLPurifier_Config') === true) {
+ echo "HTMLPurifier loaded successfully.\n";
+}
+else {
+ exit(1);
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-icingaweb2.git
More information about the Pkg-nagios-changes
mailing list