testuite fixes
[plcapi.git] / test / testsuite.php
index 39874ce..5621c47 100644 (file)
@@ -573,8 +573,15 @@ And turned it into nylon';
             $rcookies = $r->cookies();
             // remove extra cookies which might have been set by proxies
             foreach($rcookies as $c => $v)
+            {
                 if(!in_array($c, array('c2', 'c3', 'c4', 'c5')))
                     unset($rcookies[$c]);
+                // Seems like we get this when using php-fpm and php 5.5+ ...
+                if (isset($rcookies[$c]['Max-Age']))
+                {
+                    unset($rcookies[$c]['Max-Age']);
+                }
+            }
             foreach($cookies as $c => $v)
                 // format for date string in cookies: 'Mon, 31 Oct 2005 13:50:56 GMT'
                 // but PHP versions differ on that, some use 'Mon, 31-Oct-2005 13:50:56 GMT'...
@@ -774,7 +781,7 @@ class LocalHostMultiTests extends LocalhostTests
 
     function testHttps()
     {
-        global $HTTPSSERVER, $HTTPSURI, $HTTPSIGNOREPEER;
+        global $HTTPSSERVER, $HTTPSURI, $HTTPSIGNOREPEER, $HTTPSVERIFYHOST, $SSLVERSION;
         if(!function_exists('curl_init'))
         {
             $this->fail('CURL missing: cannot test https functionality');
@@ -784,15 +791,15 @@ class LocalHostMultiTests extends LocalhostTests
         $this->method = 'https';
         $this->client->method = 'https';
         $this->client->path = $HTTPSURI;
-        $this->client->setSSLVerifyPeer( !$HTTPSIGNOREPEER );
-        // silence warning with newish php versions
-        $this->client->setSSLVerifyHost(2);
+        $this->client->setSSLVerifyPeer(!$HTTPSIGNOREPEER);
+        $this->client->setSSLVerifyHost($HTTPSVERIFYHOST);
+        $this->client->setSSLVersion($SSLVERSION);
         $this->_runtests();
     }
 
     function testHttpsProxy()
     {
-        global $HTTPSSERVER, $HTTPSURI, $PROXYSERVER, $PROXYPORT, $NOPROXY;
+        global $HTTPSSERVER, $HTTPSURI, $HTTPSIGNOREPEER, $HTTPSVERIFYHOST, $SSLVERSION, $PROXYSERVER, $PROXYPORT, $NOPROXY;
         if(!function_exists('curl_init'))
         {
             $this->fail('CURL missing: cannot test https functionality');
@@ -809,6 +816,9 @@ class LocalHostMultiTests extends LocalhostTests
         $this->client->method = 'https';
         $this->client->setProxy($PROXYSERVER, $PROXYPORT);
         $this->client->path = $HTTPSURI;
+        $this->client->setSSLVerifyPeer(!$HTTPSIGNOREPEER);
+        $this->client->setSSLVerifyHost($HTTPSVERIFYHOST);
+        $this->client->setSSLVersion($SSLVERSION);
         $this->_runtests();
     }
 
@@ -888,7 +898,7 @@ class ParsingBugsTests extends PHPUnit_TestCase
         $m=new xmlrpcmsg('dummy');
         $r=$m->parseResponse($response);
         $v=$r->faultString();
-        $this->assertEquals('���àüè', $v);
+        $this->assertEquals('������', $v);
     }
 
     function testValidNumbers()