Skip to content

Commit 059caf5

Browse files
committed
Setting global loop for all tests that might need them
1 parent de7c549 commit 059caf5

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="vendor/autoload.php" colors="true">
2+
<phpunit bootstrap="tests/bootstrap.php" colors="true">
33
<testsuites>
44
<testsuite name="Test Suite">
55
<directory>tests/</directory>

tests/bootstrap.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
use function EventLoop\setLoop;
4+
use React\EventLoop\Factory;
5+
6+
require dirname(__DIR__) . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
7+
8+
setLoop(Factory::create());

0 commit comments

Comments
 (0)