From 8d2ba321343748567fadb62b7afdb63d23956b2a Mon Sep 17 00:00:00 2001 From: Timm Friebe Date: Sat, 5 Oct 2024 11:52:08 +0200 Subject: [PATCH] Fix assertHttp() --- src/test/php/websocket/unittest/HandshakeTest.class.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/test/php/websocket/unittest/HandshakeTest.class.php b/src/test/php/websocket/unittest/HandshakeTest.class.php index 4e96d44..a27b020 100755 --- a/src/test/php/websocket/unittest/HandshakeTest.class.php +++ b/src/test/php/websocket/unittest/HandshakeTest.class.php @@ -36,9 +36,7 @@ private function fixture($listener= null) { * @throws unittest.AssertionFailedError */ private function assertHttp($expected, $out) { - if (!preg_match('#^'.$expected.'$#m', $out)) { - $this->fail('=~', $out, $expected); - } + Assert::matches('#^'.$expected.'$#m', $out); } #[Test]