Skip to content

Commit 6f75101

Browse files
committed
Clean up test suite
1 parent d3b7511 commit 6f75101

File tree

7 files changed

+20
-33
lines changed

7 files changed

+20
-33
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ matrix:
1818
- php: 7.2
1919
- php: 7.3
2020
- php: 7.4
21-
- php: hhvm
21+
- php: hhvm-3.18
2222
allow_failures:
23-
- php: hhvm
23+
- php: hhvm-3.18
2424

2525
install:
2626
- composer install --no-interaction

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
"evenement/evenement": "^3.0 || ^2.0 || ^1.0",
1313
"react/promise-stream": "^1.1"
1414
},
15-
"autoload": {
16-
"psr-4": {
17-
"React\\Http\\": "src"
18-
}
19-
},
2015
"require-dev": {
2116
"clue/block-react": "^1.1",
2217
"phpunit/phpunit": "^9.0 || ^5.7 || ^4.8.35"
18+
},
19+
"autoload": {
20+
"psr-4": { "React\\Http\\": "src" }
21+
},
22+
"autoload-dev": {
23+
"psr-4": { "React\\Tests\\Http\\": "tests" }
2324
}
2425
}

phpunit.xml.dist

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<phpunit backupGlobals="false"
4-
backupStaticAttributes="false"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false"
11-
bootstrap="tests/bootstrap.php"
12-
>
3+
<phpunit bootstrap="vendor/autoload.php" colors="true">
134
<testsuites>
145
<testsuite name="React Test Suite">
156
<directory>./tests/</directory>

tests/FunctionalServerTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ public function testPlainHttpOnRandomPortWithOtherHostHeaderTakesPrecedence()
127127

128128
public function testSecureHttpsOnRandomPort()
129129
{
130-
if (!function_exists('stream_socket_enable_crypto')) {
131-
$this->markTestSkipped('Not supported on your platform (outdated HHVM?)');
130+
if (defined('HHVM_VERSION')) {
131+
$this->markTestSkipped('Not supported on HHVM');
132132
}
133133

134134
$loop = Factory::create();
@@ -162,8 +162,8 @@ public function testSecureHttpsOnRandomPort()
162162

163163
public function testSecureHttpsReturnsData()
164164
{
165-
if (!function_exists('stream_socket_enable_crypto')) {
166-
$this->markTestSkipped('Not supported on your platform (outdated HHVM?)');
165+
if (defined('HHVM_VERSION')) {
166+
$this->markTestSkipped('Not supported on HHVM');
167167
}
168168

169169
$loop = Factory::create();
@@ -203,8 +203,8 @@ public function testSecureHttpsReturnsData()
203203

204204
public function testSecureHttpsOnRandomPortWithoutHostHeaderUsesSocketUri()
205205
{
206-
if (!function_exists('stream_socket_enable_crypto')) {
207-
$this->markTestSkipped('Not supported on your platform (outdated HHVM?)');
206+
if (defined('HHVM_VERSION')) {
207+
$this->markTestSkipped('Not supported on HHVM');
208208
}
209209

210210
$loop = Factory::create();

tests/Io/RequestHeaderParserTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,10 @@ public function testServerParamsWillNotSetRemoteAddressForUnixDomainSockets()
715715

716716
public function testServerParamsWontBeSetOnMissingUrls()
717717
{
718+
if (defined('HHVM_VERSION')) {
719+
$this->markTestSkipped('Not supported on HHVM');
720+
}
721+
718722
$request = null;
719723

720724
$parser = new RequestHeaderParser();

tests/TestCase.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ protected function expectCallableConsecutive($numberOfCalls, array $with)
6363

6464
protected function createCallableMock()
6565
{
66-
return $this
67-
->getMockBuilder('React\Tests\Http\CallableStub')
68-
->getMock();
66+
return $this->getMockBuilder('stdClass')->setMethods(array('__invoke'))->getMock();
6967
}
7068

7169
public function assertContainsString($needle, $haystack)

tests/bootstrap.php

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)