diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa12b680..a0c9bf06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -32,7 +28,7 @@ jobs: steps: - name: "Checkout" - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" with: fetch-depth: 2 @@ -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 }}" diff --git a/composer.json b/composer.json index 1dffae6b..ba788169 100644 --- a/composer.json +++ b/composer.json @@ -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" } } diff --git a/tests/unit/AbstractConnectionDecoratorTest.php b/tests/unit/AbstractConnectionDecoratorTest.php index 0887d3e9..87c46ff8 100644 --- a/tests/unit/AbstractConnectionDecoratorTest.php +++ b/tests/unit/AbstractConnectionDecoratorTest.php @@ -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; } diff --git a/tests/unit/Server/IoServerTest.php b/tests/unit/Server/IoServerTest.php index e20115f2..6d7936db 100644 --- a/tests/unit/Server/IoServerTest.php +++ b/tests/unit/Server/IoServerTest.php @@ -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!'; @@ -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'));