diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b862e61..a0cee10 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,6 +28,8 @@ jobs: run: | sudo apt-get update && sudo apt-get install -y \ composer + ls -lah /etc/php/8.1/cli/php.ini + sudo sh -c 'echo "zend.assertions = 1" >> /etc/php/8.1/cli/php.ini' - name: "Install Composer dependencies" timeout-minutes: 1 diff --git a/composer.json b/composer.json index 7027fdb..3d87c80 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "scripts": { "stan": "php vendor/bin/phpstan --memory-limit=300M analyze", "unit": "php vendor/bin/phpunit -d memory_limit=70M", - "infection": "php -d zend.assertions=1 -d memory_limit=180M vendor/bin/infection --show-mutations --only-covered --threads=6 --min-covered-msi=100", + "infection": "php -d memory_limit=180M vendor/bin/infection --show-mutations --only-covered --threads=6 --min-covered-msi=100", "infection-cache": "@infection --coverage=www/coverage/", "dev": "php cli/server.php 1 8080 --debug & php cli/udp-ws-bridge.php", "dev2": "php cli/server.php 2 8080 --debug & php cli/udp-ws-bridge.php & php cli/udp-ws-bridge.php 8082", diff --git a/test/og/Unit/UtilTest.php b/test/og/Unit/UtilTest.php index 24810d0..d33222c 100644 --- a/test/og/Unit/UtilTest.php +++ b/test/og/Unit/UtilTest.php @@ -13,6 +13,12 @@ class UtilTest extends BaseTest { + public function testAssertionsEnabled(): void + { + $this->expectException('\AssertionError'); + assert(false); // @phpstan-ignore function.impossibleType + } + public function testNegativeTime(): void { $this->expectExceptionMessage('Negative time given');