diff --git a/tests/Feature/WorkerProcessTest.php b/tests/Feature/WorkerProcessTest.php index e9f752a4..692dbad2 100644 --- a/tests/Feature/WorkerProcessTest.php +++ b/tests/Feature/WorkerProcessTest.php @@ -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 () { }); @@ -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 () { }); @@ -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 () { });