Some improvements
This commit is contained in:
1 parent
a914bd74fe
commit
729c0be834
16 files changed
+577
-36
No files matched your search
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
use Tests\TestCase;
|
||||
|
||||
final class GameStressTestTest extends TestCase
|
||||
{
|
||||
#[Test]
|
||||
public function unknown_scenario_rejects_with_failure(): void
|
||||
{
|
||||
$this->artisan('game:stress', ['--scenario' => 'aliens'])
|
||||
->expectsOutputToContain('Unknown scenario')
|
||||
->assertExitCode(1);
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function step_below_one_rejects_with_failure(): void
|
||||
{
|
||||
$this->artisan('game:stress', ['--step' => '0'])
|
||||
->expectsOutputToContain('Invalid sweep range')
|
||||
->assertExitCode(1);
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function inverted_range_rejects_with_failure(): void
|
||||
{
|
||||
$this->artisan('game:stress', ['--entities-from' => '200', '--entities-to' => '100'])
|
||||
->expectsOutputToContain('Invalid sweep range')
|
||||
->assertExitCode(1);
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function breakpoint_run_reports_capacity_limits(): void
|
||||
{
|
||||
$this->artisan('game:stress', [
|
||||
'--entities-from' => '50',
|
||||
'--entities-to' => '50',
|
||||
'--step' => '50',
|
||||
'--ticks' => '5',
|
||||
'--breakpoint-only' => true,
|
||||
])
|
||||
->expectsOutputToContain('Derived capacity limits')
|
||||
->expectsOutputToContain('Reverb cap')
|
||||
->assertExitCode(0);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user