Skip to content

Commit 3f6c29c

Browse files
committed
Updates to help the tests
1 parent 8c06ac8 commit 3f6c29c

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@
4343
"react/event-loop": "^1.2"
4444
},
4545
"require-dev": {
46-
"phpunit/phpunit": "^9"
46+
"phpunit/phpunit": "^9 | ^10"
4747
}
4848
}

test/ab/clientRunner.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
const AGENT = "Websocket/0.0.0";
66

7-
echo "Using " . get_class(\EventLoop\getLoop()) . "\n";
7+
echo "Using " . get_class(\React\EventLoop\Loop::get()) . "\n";
88

99
$runReports = function () {
1010
echo "Generating report.\n";
@@ -60,7 +60,7 @@ function ($error) use ($case, $deferred) {
6060
},
6161
function () use ($case, $deferred) {
6262
echo "Finished " . $case . "\n";
63-
$deferred->resolve();
63+
$deferred->resolve(null);
6464
}
6565
);
6666

@@ -77,7 +77,7 @@ function () use ($case, $deferred) {
7777
$runNextCase = function () use (&$i, &$runNextCase, $testCount, $deferred, $runIndividualTest) {
7878
$i++;
7979
if ($i > $testCount) {
80-
$deferred->resolve();
80+
$deferred->resolve(null);
8181
return;
8282
}
8383
$runIndividualTest($i, 60000)->then(function ($result) use ($runIndividualTest, &$i) {

test/ab/testServer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
require_once __DIR__ . '/../bootstrap.php';
66

7-
$timerObservable = Observable::emptyObservable();
7+
$timerObservable = Observable::empty();
88

99
if ($argc > 1 && is_numeric($argv[1])) {
1010
echo "Setting test server to stop in " . $argv[1] . " seconds.\n";

test/bootstrap.php

+2
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@
1616
break;
1717
}
1818
}
19+
20+
Rx\Scheduler::setDefaultFactory(function () { return new \Rx\Scheduler\EventLoopScheduler(\React\EventLoop\Loop::get()); });

0 commit comments

Comments
 (0)