Those tests don't have any value as depending on different PHP versions, the headers can slightly change
This commit is contained in:
parent
ec0004ea36
commit
95a91bb8bb
|
@ -24,7 +24,6 @@ abstract class AbstractWebServerTest extends \PHPUnit_Framework_TestCase
|
|||
* @var ProcessBuilder
|
||||
*/
|
||||
static protected $webserver;
|
||||
static protected $websererPortLength;
|
||||
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
|
@ -44,8 +43,6 @@ abstract class AbstractWebServerTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
self::$webserver->start();
|
||||
usleep(100000);
|
||||
|
||||
self::$websererPortLength = strlen(WEBSERVER_PORT);
|
||||
}
|
||||
|
||||
public static function tearDownAfterClass()
|
||||
|
|
|
@ -45,19 +45,6 @@ class CurlTest extends AbstractWebserverTest
|
|||
$this->assertEquals('Unable to parse URL', $curl->getErrorMessage());
|
||||
}
|
||||
|
||||
public function testGetRequestHeaders()
|
||||
{
|
||||
$curl = new Curl(array(
|
||||
'proxy_host' => false,
|
||||
));
|
||||
|
||||
$curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT));
|
||||
$this->assertEquals(132 + self::$websererPortLength, strlen($curl->getRequestHeaders()));
|
||||
|
||||
$curl->exec(sprintf('http://localhost:%s/404.txt', WEBSERVER_PORT));
|
||||
$this->assertEquals(131 + self::$websererPortLength, strlen($curl->getRequestHeaders()));
|
||||
}
|
||||
|
||||
public function testGetResponse()
|
||||
{
|
||||
$curl = new Curl(array(
|
||||
|
@ -66,7 +53,6 @@ class CurlTest extends AbstractWebserverTest
|
|||
|
||||
$curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT));
|
||||
$this->assertSame('OK', $curl->getResponseStatusMessage());
|
||||
$this->assertEquals(145 + self::$websererPortLength, strlen($curl->getResponse()));
|
||||
|
||||
$curl->exec(sprintf('http://localhost:%d/404.txt', WEBSERVER_PORT));
|
||||
$this->assertSame('Not Found', $curl->getResponseStatusMessage());
|
||||
|
@ -95,19 +81,6 @@ class CurlTest extends AbstractWebserverTest
|
|||
$this->assertEquals('text/html; charset=UTF-8', $curl->getResponseContentType());
|
||||
}
|
||||
|
||||
public function testGetResponseHeaders()
|
||||
{
|
||||
$curl = new Curl(array(
|
||||
'proxy_host' => false,
|
||||
));
|
||||
|
||||
$curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT));
|
||||
$this->assertEquals(117 + self::$websererPortLength, strlen($curl->getResponseHeaders()));
|
||||
|
||||
$curl->exec(sprintf('http://localhost:%d/404.txt', WEBSERVER_PORT));
|
||||
$this->assertEquals(124 + self::$websererPortLength, strlen($curl->getResponseHeaders()));
|
||||
}
|
||||
|
||||
public function testGetResponseStatusCode()
|
||||
{
|
||||
$curl = new Curl(array(
|
||||
|
|
Loading…
Reference in New Issue