Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
name: "CI"

on:
pull_request:
push:
branches:
- "master"
schedule:
- cron: "42 3 * * *"
pull_request:

jobs:
phpunit:
name: "PHPUnit"
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-24.04"

strategy:
matrix:
Expand All @@ -32,7 +28,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"
with:
fetch-depth: 2

Expand All @@ -44,7 +40,7 @@ jobs:
ini-values: "zend.assertions=1"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
, "symfony/routing": "^2.6|^3.0|^4.0|^5.0|^6.0"
}
, "require-dev": {
"phpunit/phpunit": "~4.8"
"phpunit/phpunit": "~4.8",
"psr/http-message": "~1.0.1"
}
}
12 changes: 12 additions & 0 deletions tests/unit/AbstractConnectionDecoratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,28 @@ public function testDecoratorRecursionLevel2() {
}

public function testWarningGettingNothing() {
if (!(error_reporting() & E_NOTICE)) {
$this->markTestSkipped('Requires error_reporting to include E_NOTICE');
}

$this->setExpectedException('PHPUnit_Framework_Error');
$var = $this->mock->nonExistant;
}

public function testWarningGettingNothingLevel1() {
if (!(error_reporting() & E_NOTICE)) {
$this->markTestSkipped('Requires error_reporting to include E_NOTICE');
}

$this->setExpectedException('PHPUnit_Framework_Error');
$var = $this->l1->nonExistant;
}

public function testWarningGettingNothingLevel2() {
if (!(error_reporting() & E_NOTICE)) {
$this->markTestSkipped('Requires error_reporting to include E_NOTICE');
}

$this->setExpectedException('PHPUnit_Framework_Error');
$var = $this->l2->nonExistant;
}
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/Server/IoServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ public function testOnOpen() {
//$this->assertTrue(is_int($this->app->last['onOpen'][0]->resourceId));
}

/**
* @requires extension sockets
*/
public function testOnData() {
$msg = 'Hello World!';

Expand All @@ -73,6 +76,9 @@ public function testOnData() {
$this->tickLoop($this->server->loop);
}

/**
* @requires extension sockets
*/
public function testOnClose() {
$this->app->expects($this->once())->method('onClose')->with($this->isInstanceOf('\\Ratchet\\ConnectionInterface'));

Expand Down