Skip to content

Commit

Permalink
Use reactphp/async instead of clue/reactphp-block
Browse files Browse the repository at this point in the history
  • Loading branch information
dinooo13 committed Oct 4, 2022
1 parent 09366dd commit b919e5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
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
9 changes: 4 additions & 5 deletions tests/FunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Clue\Tests\React\HttpProxy;

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

Expand All @@ -20,7 +19,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 +33,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 +51,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 +65,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

0 comments on commit b919e5a

Please sign in to comment.