Those tests don't have any value as depending on different PHP versions, the headers can slightly change

This commit is contained in:
BohwaZ 2019-08-06 10:48:46 +02:00
parent ec0004ea36
commit 95a91bb8bb
2 changed files with 0 additions and 30 deletions

View File

@ -24,7 +24,6 @@ abstract class AbstractWebServerTest extends \PHPUnit_Framework_TestCase
* @var ProcessBuilder * @var ProcessBuilder
*/ */
static protected $webserver; static protected $webserver;
static protected $websererPortLength;
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
@ -44,8 +43,6 @@ abstract class AbstractWebServerTest extends \PHPUnit_Framework_TestCase
self::$webserver->start(); self::$webserver->start();
usleep(100000); usleep(100000);
self::$websererPortLength = strlen(WEBSERVER_PORT);
} }
public static function tearDownAfterClass() public static function tearDownAfterClass()

View File

@ -45,19 +45,6 @@ class CurlTest extends AbstractWebserverTest
$this->assertEquals('Unable to parse URL', $curl->getErrorMessage()); $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() public function testGetResponse()
{ {
$curl = new Curl(array( $curl = new Curl(array(
@ -66,7 +53,6 @@ class CurlTest extends AbstractWebserverTest
$curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT)); $curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT));
$this->assertSame('OK', $curl->getResponseStatusMessage()); $this->assertSame('OK', $curl->getResponseStatusMessage());
$this->assertEquals(145 + self::$websererPortLength, strlen($curl->getResponse()));
$curl->exec(sprintf('http://localhost:%d/404.txt', WEBSERVER_PORT)); $curl->exec(sprintf('http://localhost:%d/404.txt', WEBSERVER_PORT));
$this->assertSame('Not Found', $curl->getResponseStatusMessage()); $this->assertSame('Not Found', $curl->getResponseStatusMessage());
@ -95,19 +81,6 @@ class CurlTest extends AbstractWebserverTest
$this->assertEquals('text/html; charset=UTF-8', $curl->getResponseContentType()); $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() public function testGetResponseStatusCode()
{ {
$curl = new Curl(array( $curl = new Curl(array(