diff --git a/README.md b/README.md index f95214e5..9de7bcd5 100644 --- a/README.md +++ b/README.md @@ -2741,6 +2741,14 @@ To run the test suite, go to the project root and run: $ php vendor/bin/phpunit ``` +The test suite also contains a number of functional integration tests that rely +on a stable internet connection. +If you do not want to run these, they can simply be skipped like this: + +```bash +$ php vendor/bin/phpunit --exclude-group internet +``` + ## License MIT, see [LICENSE file](LICENSE). diff --git a/tests/Client/FunctionalIntegrationTest.php b/tests/Client/FunctionalIntegrationTest.php index d6cc4b0f..db82b1f1 100644 --- a/tests/Client/FunctionalIntegrationTest.php +++ b/tests/Client/FunctionalIntegrationTest.php @@ -101,6 +101,10 @@ public function testSuccessfulResponseEmitsEnd() /** @group internet */ public function testPostDataReturnsData() { + if (defined('HHVM_VERSION')) { + $this->markTestSkipped('Not supported on HHVM'); + } + $loop = Factory::create(); $client = new Client($loop); @@ -130,6 +134,10 @@ public function testPostDataReturnsData() /** @group internet */ public function testPostJsonReturnsData() { + if (defined('HHVM_VERSION')) { + $this->markTestSkipped('Not supported on HHVM'); + } + $loop = Factory::create(); $client = new Client($loop); diff --git a/tests/FunctionalBrowserTest.php b/tests/FunctionalBrowserTest.php index 3cf9293a..f4495565 100644 --- a/tests/FunctionalBrowserTest.php +++ b/tests/FunctionalBrowserTest.php @@ -351,25 +351,25 @@ public function testGetRequestWithResponseBufferExceededDuringStreamingRejects() } /** - * @group online + * @group internet * @doesNotPerformAssertions */ public function testCanAccessHttps() { - if (!function_exists('stream_socket_enable_crypto')) { - $this->markTestSkipped('Not supported on your platform (outdated HHVM?)'); + if (defined('HHVM_VERSION')) { + $this->markTestSkipped('Not supported on HHVM'); } Block\await($this->browser->get('https://www.google.com/'), $this->loop); } /** - * @group online + * @group internet */ public function testVerifyPeerEnabledForBadSslRejects() { - if (!function_exists('stream_socket_enable_crypto')) { - $this->markTestSkipped('Not supported on your platform (outdated HHVM?)'); + if (defined('HHVM_VERSION')) { + $this->markTestSkipped('Not supported on HHVM'); } $connector = new Connector($this->loop, array( @@ -385,13 +385,13 @@ public function testVerifyPeerEnabledForBadSslRejects() } /** - * @group online + * @group internet * @doesNotPerformAssertions */ public function testVerifyPeerDisabledForBadSslResolves() { - if (!function_exists('stream_socket_enable_crypto')) { - $this->markTestSkipped('Not supported on your platform (outdated HHVM?)'); + if (defined('HHVM_VERSION')) { + $this->markTestSkipped('Not supported on HHVM'); } $connector = new Connector($this->loop, array( @@ -406,7 +406,7 @@ public function testVerifyPeerDisabledForBadSslResolves() } /** - * @group online + * @group internet */ public function testInvalidPort() { diff --git a/tests/Io/RequestHeaderParserTest.php b/tests/Io/RequestHeaderParserTest.php index ca18df13..b0a339ed 100644 --- a/tests/Io/RequestHeaderParserTest.php +++ b/tests/Io/RequestHeaderParserTest.php @@ -340,9 +340,6 @@ public function testInvalidMalformedRequestLineParseException() $this->assertSame('Unable to parse invalid request-line', $error->getMessage()); } - /** - * @group a - */ public function testInvalidMalformedRequestHeadersThrowsParseException() { $error = null; @@ -362,9 +359,6 @@ public function testInvalidMalformedRequestHeadersThrowsParseException() $this->assertSame('Unable to parse invalid request header fields', $error->getMessage()); } - /** - * @group a - */ public function testInvalidMalformedRequestHeadersWhitespaceThrowsParseException() { $error = null;