diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index aa12b680..3444e463 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -14,6 +14,7 @@ jobs:
runs-on: "ubuntu-20.04"
strategy:
+ fail-fast: false
matrix:
php-version:
- "5.4"
@@ -24,6 +25,9 @@ jobs:
- "7.2"
- "7.3"
- "7.4"
+ - "8.0"
+ - "8.1"
+ - "8.2"
dependencies:
- "highest"
include:
diff --git a/.gitignore b/.gitignore
index 793ef583..de86e376 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+.phpunit.result.cache
phpunit.xml
reports
sandbox
diff --git a/composer.json b/composer.json
index 1dffae6b..8eee5708 100644
--- a/composer.json
+++ b/composer.json
@@ -35,6 +35,6 @@
, "symfony/routing": "^2.6|^3.0|^4.0|^5.0|^6.0"
}
, "require-dev": {
- "phpunit/phpunit": "~4.8"
+ "phpunit/phpunit": "^9.3 || ^5.7"
}
}
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 0cc5451b..117227af 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -16,12 +16,6 @@
-
-
- ./tests/integration/
-
-
-
./src/
diff --git a/tests/helpers/Ratchet/AbstractMessageComponentTestCase.php b/tests/helpers/Ratchet/AbstractMessageComponentTestCase.php
index 8c298e5b..3d033495 100644
--- a/tests/helpers/Ratchet/AbstractMessageComponentTestCase.php
+++ b/tests/helpers/Ratchet/AbstractMessageComponentTestCase.php
@@ -1,7 +1,9 @@
_app = $this->getMock($this->getComponentClassString());
$decorator = $this->getDecoratorClassString();
$this->_serv = new $decorator($this->_app);
diff --git a/tests/unit/AbstractConnectionDecoratorTest.php b/tests/unit/AbstractConnectionDecoratorTest.php
index 0887d3e9..e724d780 100644
--- a/tests/unit/AbstractConnectionDecoratorTest.php
+++ b/tests/unit/AbstractConnectionDecoratorTest.php
@@ -1,17 +1,18 @@
mock = $this->getMock('\Ratchet\ConnectionInterface');
$this->l1 = new ConnectionDecorator($this->mock);
$this->l2 = new ConnectionDecorator($this->l1);
diff --git a/tests/unit/Http/HttpRequestParserTest.php b/tests/unit/Http/HttpRequestParserTest.php
index 6af8402c..b75daa21 100644
--- a/tests/unit/Http/HttpRequestParserTest.php
+++ b/tests/unit/Http/HttpRequestParserTest.php
@@ -1,13 +1,15 @@
parser = new HttpRequestParser;
}
diff --git a/tests/unit/Http/HttpServerTest.php b/tests/unit/Http/HttpServerTest.php
index 7041d66b..6c214c16 100644
--- a/tests/unit/Http/HttpServerTest.php
+++ b/tests/unit/Http/HttpServerTest.php
@@ -6,8 +6,8 @@
* @covers Ratchet\Http\HttpServer
*/
class HttpServerTest extends AbstractMessageComponentTestCase {
- public function setUp() {
- parent::setUp();
+ public function before() {
+ parent::before();
$this->_conn->httpHeadersReceived = true;
}
diff --git a/tests/unit/Http/OriginCheckTest.php b/tests/unit/Http/OriginCheckTest.php
index c1c40120..17b14af3 100644
--- a/tests/unit/Http/OriginCheckTest.php
+++ b/tests/unit/Http/OriginCheckTest.php
@@ -8,7 +8,7 @@
class OriginCheckTest extends AbstractMessageComponentTestCase {
protected $_reqStub;
- public function setUp() {
+ public function before() {
$this->_reqStub = $this->getMock('Psr\Http\Message\RequestInterface');
$this->_reqStub->expects($this->any())->method('getHeader')->will($this->returnValue(['localhost']));
diff --git a/tests/unit/Http/RouterTest.php b/tests/unit/Http/RouterTest.php
index 1ca4cbc8..46c4c1cd 100644
--- a/tests/unit/Http/RouterTest.php
+++ b/tests/unit/Http/RouterTest.php
@@ -1,5 +1,6 @@
_conn = $this->getMock('\Ratchet\ConnectionInterface');
$this->_uri = $this->getMock('Psr\Http\Message\UriInterface');
$this->_req = $this->getMock('\Psr\Http\Message\RequestInterface');
diff --git a/tests/unit/Server/EchoServerTest.php b/tests/unit/Server/EchoServerTest.php
index 47fb0e28..6d51d356 100644
--- a/tests/unit/Server/EchoServerTest.php
+++ b/tests/unit/Server/EchoServerTest.php
@@ -1,12 +1,13 @@
_conn = $this->getMock('\Ratchet\ConnectionInterface');
$this->_comp = new EchoServer;
}
diff --git a/tests/unit/Server/FlashPolicyComponentTest.php b/tests/unit/Server/FlashPolicyComponentTest.php
index 38fc96a6..2bf77e35 100644
--- a/tests/unit/Server/FlashPolicyComponentTest.php
+++ b/tests/unit/Server/FlashPolicyComponentTest.php
@@ -1,15 +1,16 @@
_policy = new FlashPolicy();
}
diff --git a/tests/unit/Server/IoConnectionTest.php b/tests/unit/Server/IoConnectionTest.php
index 07130f6d..37a83e67 100644
--- a/tests/unit/Server/IoConnectionTest.php
+++ b/tests/unit/Server/IoConnectionTest.php
@@ -1,15 +1,16 @@
sock = $this->getMock('\\React\\Socket\\ConnectionInterface');
$this->conn = new IoConnection($this->sock);
}
diff --git a/tests/unit/Server/IoServerTest.php b/tests/unit/Server/IoServerTest.php
index e20115f2..5e769828 100644
--- a/tests/unit/Server/IoServerTest.php
+++ b/tests/unit/Server/IoServerTest.php
@@ -1,5 +1,6 @@
run();
}
- public function setUp() {
+ public function before() {
$this->app = $this->getMock('\\Ratchet\\MessageComponentInterface');
$loop = new StreamSelectLoop;
diff --git a/tests/unit/Server/IpBlackListComponentTest.php b/tests/unit/Server/IpBlackListComponentTest.php
index 90f41859..1822033c 100644
--- a/tests/unit/Server/IpBlackListComponentTest.php
+++ b/tests/unit/Server/IpBlackListComponentTest.php
@@ -1,15 +1,16 @@
mock = $this->getMock('\\Ratchet\\MessageComponentInterface');
$this->blocker = new IpBlackList($this->mock);
}
diff --git a/tests/unit/Session/Serialize/PhpHandlerTest.php b/tests/unit/Session/Serialize/PhpHandlerTest.php
index 4acf5bc6..d5a1ea2b 100644
--- a/tests/unit/Session/Serialize/PhpHandlerTest.php
+++ b/tests/unit/Session/Serialize/PhpHandlerTest.php
@@ -1,14 +1,15 @@
_handler = new PhpHandler;
}
diff --git a/tests/unit/Session/SessionComponentTest.php b/tests/unit/Session/SessionComponentTest.php
index ea452db3..a11e5e61 100644
--- a/tests/unit/Session/SessionComponentTest.php
+++ b/tests/unit/Session/SessionComponentTest.php
@@ -10,7 +10,7 @@
* @covers Ratchet\Session\Storage\Proxy\VirtualProxy
*/
class SessionProviderTest extends AbstractMessageComponentTestCase {
- public function setUp() {
+ public function before() {
return $this->markTestIncomplete('Test needs to be updated for ini_set issue in PHP 7.2');
if (!class_exists('Symfony\Component\HttpFoundation\Session\Session')) {
@@ -21,7 +21,7 @@ public function setUp() {
$this->_serv = new SessionProvider($this->_app, new NullSessionHandler);
}
- public function tearDown() {
+ public function after() {
ini_set('session.serialize_handler', 'php');
}
diff --git a/tests/unit/Session/Storage/VirtualSessionStoragePDOTest.php b/tests/unit/Session/Storage/VirtualSessionStoragePDOTest.php
index 2727484d..40e4f117 100644
--- a/tests/unit/Session/Storage/VirtualSessionStoragePDOTest.php
+++ b/tests/unit/Session/Storage/VirtualSessionStoragePDOTest.php
@@ -1,11 +1,12 @@
markTestSkipped('Session test requires PDO and pdo_sqlite');
}
@@ -41,7 +42,7 @@ public function setUp() {
$this->_virtualSessionStorage->registerBag(new AttributeBag());
}
- public function tearDown() {
+ public function after() {
unlink($this->_pathToDB);
}
diff --git a/tests/unit/Wamp/ServerProtocolTest.php b/tests/unit/Wamp/ServerProtocolTest.php
index 8ff68c25..afac7870 100644
--- a/tests/unit/Wamp/ServerProtocolTest.php
+++ b/tests/unit/Wamp/ServerProtocolTest.php
@@ -1,5 +1,6 @@
_app = new TestComponent;
$this->_comp = new ServerProtocol($this->_app);
}
diff --git a/tests/unit/Wamp/TopicManagerTest.php b/tests/unit/Wamp/TopicManagerTest.php
index b21b6bc0..0acc17fb 100644
--- a/tests/unit/Wamp/TopicManagerTest.php
+++ b/tests/unit/Wamp/TopicManagerTest.php
@@ -1,10 +1,12 @@
conn = $this->getMock('\Ratchet\ConnectionInterface');
$this->mock = $this->getMock('\Ratchet\Wamp\WampServerInterface');
$this->mngr = new TopicManager($this->mock);
diff --git a/tests/unit/Wamp/TopicTest.php b/tests/unit/Wamp/TopicTest.php
index b8685b7e..697702e8 100644
--- a/tests/unit/Wamp/TopicTest.php
+++ b/tests/unit/Wamp/TopicTest.php
@@ -1,10 +1,12 @@
mock = $this->getMock('\\Ratchet\\ConnectionInterface');
$this->conn = new WampConnection($this->mock);
}