Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"ringcentral/psr7": "^1.2"
},
"require-dev": {
"clue/block-react": "^1.5",
"react/async": "^4 || ^3 || ^2",
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8",
"react/event-loop": "^1.2",
"react/http": "^1.5"
Expand Down
10 changes: 4 additions & 6 deletions tests/FunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace Clue\Tests\React\HttpProxy;

use Clue\React\Block;
use Clue\React\HttpProxy\ProxyConnector;
use React\EventLoop\Loop;

/** @group internet */
class FunctionalTest extends AbstractTestCase
Expand All @@ -20,7 +18,7 @@ public function testNonListeningSocketRejectsConnection()
'Connection to tcp://google.com:80 failed because connection to proxy failed (ECONNREFUSED)',
defined('SOCKET_ECONNREFUSED') ? SOCKET_ECONNREFUSED : 111
);
Block\await($promise, Loop::get(), 3.0);
\React\Async\await(\React\Promise\Timer\timeout($promise, 3.0));
}

public function testPlainGoogleDoesNotAcceptConnectMethod()
Expand All @@ -34,7 +32,7 @@ public function testPlainGoogleDoesNotAcceptConnectMethod()
'Connection to tcp://google.com:80 failed because proxy refused connection with HTTP error code 405 (Method Not Allowed) (ECONNREFUSED)',
defined('SOCKET_ECONNREFUSED') ? SOCKET_ECONNREFUSED : 111
);
Block\await($promise, Loop::get(), 3.0);
\React\Async\await(\React\Promise\Timer\timeout($promise, 3.0));
}

public function testSecureGoogleDoesNotAcceptConnectMethod()
Expand All @@ -52,7 +50,7 @@ public function testSecureGoogleDoesNotAcceptConnectMethod()
'Connection to tcp://google.com:80 failed because proxy refused connection with HTTP error code 405 (Method Not Allowed) (ECONNREFUSED)',
defined('SOCKET_ECONNREFUSED') ? SOCKET_ECONNREFUSED : 111
);
Block\await($promise, Loop::get(), 3.0);
\React\Async\await(\React\Promise\Timer\timeout($promise, 3.0));
}

public function testSecureGoogleDoesNotAcceptPlainStream()
Expand All @@ -66,7 +64,7 @@ public function testSecureGoogleDoesNotAcceptPlainStream()
'Connection to tcp://google.com:80 failed because connection to proxy was lost while waiting for response (ECONNRESET)',
defined('SOCKET_ECONNRESET') ? SOCKET_ECONNRESET : 104
);
Block\await($promise, Loop::get(), 3.0);
\React\Async\await(\React\Promise\Timer\timeout($promise, 3.0));
}

/**
Expand Down