|
35 | 35 | ChildProcess::php("-r 'sleep(5);'", 'some-alias', ['baz' => 'zah']);
|
36 | 36 |
|
37 | 37 | Http::assertSent(function (Request $request) {
|
38 |
| - return $request->url() === 'http://localhost:4000/api/child-process/start' && |
| 38 | + return $request->url() === 'http://localhost:4000/api/child-process/start-php' && |
39 | 39 | $request['alias'] === 'some-alias' &&
|
40 |
| - $request['cmd'] === [PHP_BINARY, "-r 'sleep(5);'"] && |
| 40 | + $request['cmd'] === ["-r 'sleep(5);'"] && |
41 | 41 | $request['cwd'] === base_path() &&
|
42 | 42 | $request['env'] === ['baz' => 'zah'];
|
43 | 43 | });
|
|
47 | 47 | ChildProcess::artisan('foo:bar --verbose', 'some-alias', ['baz' => 'zah']);
|
48 | 48 |
|
49 | 49 | Http::assertSent(function (Request $request) {
|
50 |
| - return $request->url() === 'http://localhost:4000/api/child-process/start' && |
| 50 | + return $request->url() === 'http://localhost:4000/api/child-process/start-php' && |
51 | 51 | $request['alias'] === 'some-alias' &&
|
52 |
| - $request['cmd'] === [PHP_BINARY, 'artisan', 'foo:bar --verbose'] && |
| 52 | + $request['cmd'] === ['artisan', 'foo:bar --verbose'] && |
53 | 53 | $request['cwd'] === base_path() &&
|
54 | 54 | $request['env'] === ['baz' => 'zah'];
|
55 | 55 | });
|
|
65 | 65 |
|
66 | 66 | it('accepts either a string or a array as php command argument', function () {
|
67 | 67 | ChildProcess::php("-r 'sleep(5);'", 'some-alias');
|
68 |
| - Http::assertSent(fn (Request $request) => $request['cmd'] === [PHP_BINARY, "-r 'sleep(5);'"]); |
| 68 | + Http::assertSent(fn (Request $request) => $request['cmd'] === ["-r 'sleep(5);'"]); |
69 | 69 |
|
70 | 70 | ChildProcess::php(['-r', "'sleep(5);'"], 'some-alias');
|
71 |
| - Http::assertSent(fn (Request $request) => $request['cmd'] === [PHP_BINARY, '-r', "'sleep(5);'"]); |
| 71 | + Http::assertSent(fn (Request $request) => $request['cmd'] === ['-r', "'sleep(5);'"]); |
72 | 72 | });
|
73 | 73 |
|
74 | 74 | it('accepts either a string or a array as artisan command argument', function () {
|
75 | 75 | ChildProcess::artisan('foo:bar', 'some-alias');
|
76 |
| - Http::assertSent(fn (Request $request) => $request['cmd'] === [PHP_BINARY, 'artisan', 'foo:bar']); |
| 76 | + Http::assertSent(fn (Request $request) => $request['cmd'] === ['artisan', 'foo:bar']); |
77 | 77 |
|
78 | 78 | ChildProcess::artisan(['foo:baz'], 'some-alias');
|
79 |
| - Http::assertSent(fn (Request $request) => $request['cmd'] === [PHP_BINARY, 'artisan', 'foo:baz']); |
| 79 | + Http::assertSent(fn (Request $request) => $request['cmd'] === ['artisan', 'foo:baz']); |
80 | 80 | });
|
81 | 81 |
|
82 | 82 | it('sets the cwd to the base path if none was given', function () {
|
|
0 commit comments