Skip to content

Commit

Permalink
Fixes tests when using Process 7.1 (#1456)
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone authored May 31, 2024
1 parent fb6333b commit 4400962
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/Feature/WorkerProcessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
use Laravel\Horizon\WorkerProcess;
use Symfony\Component\Process\Process;

use function Orchestra\Testbench\package_path;

class WorkerProcessTest extends IntegrationTest
{
public function test_worker_process_fires_event_if_stopped_process_cant_be_restarted()
{
Event::fake();

$process = new Process(['exit', 1]);
$process = Process::fromShellCommandline('exit 1', package_path());
$workerProcess = new WorkerProcess($process);
$workerProcess->start(function () {
});
Expand All @@ -31,7 +32,7 @@ public function test_process_is_not_restarted_during_cooldown_period()
{
Event::fake();

$process = new Process(['exit', 1]);
$process = Process::fromShellCommandline('exit 1', package_path());
$workerProcess = new WorkerProcess($process);
$workerProcess->start(function () {
});
Expand All @@ -47,7 +48,7 @@ public function test_process_is_restarted_after_cooldown_period()
{
Event::fake();

$process = new Process(['exit', 1]);
$process = Process::fromShellCommandline('exit 1', package_path());
$workerProcess = new WorkerProcess($process);
$workerProcess->start(function () {
});
Expand Down

0 comments on commit 4400962

Please sign in to comment.