From 04566039759847c95567b504f2a42c1b156a0e40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Tue, 25 Oct 2022 11:33:02 +0200 Subject: [PATCH] Update test environment to report failed assertions --- .github/workflows/ci.yml | 3 ++- composer.json | 2 +- phpunit.xml.dist | 14 +++++++++++--- phpunit.xml.legacy | 8 ++++++++ tests/IntegrationTest.php | 1 + 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 05134d69..43e3b8db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,7 @@ jobs: with: php-version: ${{ matrix.php }} coverage: xdebug + ini-file: development - run: composer install - run: vendor/bin/phpunit --coverage-text if: ${{ matrix.php >= 7.3 }} @@ -57,7 +58,7 @@ jobs: continue-on-error: true steps: - uses: actions/checkout@v3 - - run: cp `which composer` composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM + - run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM - name: Run hhvm composer.phar install uses: docker://hhvm/hhvm:3.30-lts-latest with: diff --git a/composer.json b/composer.json index ae325fc9..8613aa95 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,7 @@ "react/stream": "^1.2" }, "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", "react/async": "^4 || ^3 || ^2", "react/promise-stream": "^1.4" }, diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 93a36f6b..7a9577e9 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,8 +1,8 @@ - - +./src/ + + + + + + + + diff --git a/phpunit.xml.legacy b/phpunit.xml.legacy index fbb43e85..0d35225d 100644 --- a/phpunit.xml.legacy +++ b/phpunit.xml.legacy @@ -15,4 +15,12 @@ ./src/ + + + + + + + + diff --git a/tests/IntegrationTest.php b/tests/IntegrationTest.php index dfd15ce5..7883740d 100644 --- a/tests/IntegrationTest.php +++ b/tests/IntegrationTest.php @@ -151,6 +151,7 @@ public function testWaitingForRejectedConnectionShouldNotCreateAnyGarbageReferen $connector = new Connector(array('timeout' => false)); gc_collect_cycles(); + gc_collect_cycles(); // clear twice to avoid leftovers in PHP 7.4 with ext-xdebug and code coverage turned on $wait = true; $promise = $connector->connect('127.0.0.1:1')->then(