Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
starswaitforus committed Oct 9, 2024
1 parent 552f2f0 commit cd6a5a6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
- name: "Install Linux dependencies"
timeout-minutes: 1
run: |
php -i | grep assert
php --ini
false
sudo apt-get update && sudo apt-get install -y \
composer
Expand All @@ -38,7 +41,8 @@ jobs:
timeout-minutes: 1
run: |
export XDEBUG_MODE=off
composer check
composer unit
false
- name: "Check code coverage min percentage"
timeout-minutes: 4
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions test/og/Game/RoundTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public function testMsToTickConstantTenOnTest(): void
$this->assertSame(0, Util::millisecondsToFrames(0));
$this->assertSame(1, Util::millisecondsToFrames(1));
$this->assertSame(1, Util::millisecondsToFrames(10));
assert(false);
$this->assertSame(123, Util::millisecondsToFrames(1230));
$this->assertSame(240, Util::millisecondsToFrames(RifleAk::reloadTimeMs));
}
Expand Down
6 changes: 6 additions & 0 deletions test/og/Unit/UtilTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
class UtilTest extends BaseTest
{

public function testAssertionsEnabled(): void
{
$this->expectException('\AssertionError');
assert(false);
}

public function testNegativeTime(): void
{
$this->expectExceptionMessage('Negative time given');
Expand Down

0 comments on commit cd6a5a6

Please sign in to comment.