Преглед на файлове

Fixing HTTP client tests to skip if server returns 501 on TRACE requests (e.g. lighttpd)

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@16975 44c647ce-9c0f-0410-b52a-842ac1e357ba
shahar преди 16 години
родител
ревизия
c6807d1822
променени са 1 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 4 4
      tests/Zend/Http/Client/CommonHttpTests.php

+ 4 - 4
tests/Zend/Http/Client/CommonHttpTests.php

@@ -126,7 +126,7 @@ abstract class Zend_Http_Client_CommonHttpTests extends PHPUnit_Framework_TestCa
         ));
 
         $res = $this->client->request(Zend_Http_Client::TRACE);
-        if ($res->getStatus() == 405) {
+        if ($res->getStatus() == 405 || $res->getStatus() == 501) {
             $this->markTestSkipped("Server does not allow the TRACE method");
         }
 
@@ -275,7 +275,7 @@ abstract class Zend_Http_Client_CommonHttpTests extends PHPUnit_Framework_TestCa
         $this->client->setHeaders($acceptHeader);
 
         $res = $this->client->request('TRACE');
-        if ($res->getStatus() == 405) {
+        if ($res->getStatus() == 405 || $res->getStatus() == 501) {
             $this->markTestSkipped("Server does not allow the TRACE method");
         }
         
@@ -305,7 +305,7 @@ abstract class Zend_Http_Client_CommonHttpTests extends PHPUnit_Framework_TestCa
         $this->client->setHeaders($headers);
 
         $res = $this->client->request('TRACE');
-        if ($res->getStatus() == 405) {
+        if ($res->getStatus() == 405 || $res->getStatus() == 501) {
             $this->markTestSkipped("Server does not allow the TRACE method");
         }
         
@@ -343,7 +343,7 @@ abstract class Zend_Http_Client_CommonHttpTests extends PHPUnit_Framework_TestCa
 
         $this->client->setHeaders($headers);
         $res = $this->client->request('TRACE');
-        if ($res->getStatus() == 405) {
+        if ($res->getStatus() == 405 || $res->getStatus() == 501) {
             $this->markTestSkipped("Server does not allow the TRACE method");
         }
         $body = strtolower($res->getBody());