summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2013-04-12 11:39:02 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2013-04-12 11:39:02 (GMT)
commite330a4acc6c871e5730ce697247655a0e467d5d2 (patch)
tree75629262e8dcc715adc710c1b75c579dafe60475
parent78f024d71fdd42923417e3dc03d5a35ab1313efa (diff)
downloadlibkolabxml-e330a4acc6c871e5730ce697247655a0e467d5d2.tar.gz
Make php tests pass with older libcurl versions.
-rwxr-xr-xsrc/php/test.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/php/test.php b/src/php/test.php
index 3e4f28f..22fd6ca 100755
--- a/src/php/test.php
+++ b/src/php/test.php
@@ -27,6 +27,9 @@ function assertequal($got, $expect, $name) {
function assertcontains($haystack, $needle, $name) {
// remove whitespace
$haystack = preg_replace('/\n\s*/ims', '', $haystack);
+ // The following two statements are only required with older libcurl versions which erroneusly encode - and .
+ $haystack = preg_replace('/%2D/', '-', $haystack);
+ $haystack = preg_replace('/%2E/', '.', $haystack);
$needle = preg_replace('/\n\s*/ims', '', $needle);
return assertequal(substr(strstr($haystack, $needle), 0, strlen($needle)), $needle, $name);