|
23 | 23 | expect(false)->toBeTrue("Tool execution failed with error: {$errorText}"); |
24 | 24 | } |
25 | 25 |
|
26 | | - expect($result->isError)->toBeFalse(); |
27 | | - expect($result->content)->toBeArray(); |
| 26 | + expect($result->isError)->toBeFalse() |
| 27 | + ->and($result->content)->toBeArray(); |
28 | 28 |
|
29 | 29 | // The content should contain the app name (which should be "Laravel" in testbench) |
30 | 30 | $textContent = $result->content[0]->text ?? ''; |
|
48 | 48 | $result1 = $executor->execute(Tinker::class, ['code' => 'return getmypid();']); |
49 | 49 | $result2 = $executor->execute(Tinker::class, ['code' => 'return getmypid();']); |
50 | 50 |
|
51 | | - expect($result1->isError)->toBeFalse(); |
52 | | - expect($result2->isError)->toBeFalse(); |
| 51 | + expect($result1->isError)->toBeFalse() |
| 52 | + ->and($result2->isError)->toBeFalse(); |
53 | 53 |
|
54 | 54 | $pid1 = json_decode($result1->content[0]->text, true)['result']; |
55 | 55 | $pid2 = json_decode($result2->content[0]->text, true)['result']; |
56 | 56 |
|
57 | | - expect($pid1)->toBeInt()->not->toBe(getmypid()); |
58 | | - expect($pid2)->toBeInt()->not->toBe(getmypid()); |
59 | | - expect($pid1)->not()->toBe($pid2); |
| 57 | + expect($pid1)->toBeInt()->not->toBe(getmypid()) |
| 58 | + ->and($pid2)->toBeInt()->not->toBe(getmypid()) |
| 59 | + ->and($pid1)->not()->toBe($pid2); |
60 | 60 | }); |
61 | 61 |
|
62 | 62 | test('subprocess sees modified autoloaded code changes', function () { |
|
92 | 92 | $result2 = $executor->execute(GetConfig::class, ['key' => 'app.name']); |
93 | 93 | $response2 = json_decode($result2->content[0]->text, true); |
94 | 94 |
|
95 | | - expect($result2->isError)->toBeFalse(); |
96 | | - expect($response2['value'])->toBe('MODIFIED_BY_TEST'); // Using updated code, not cached |
| 95 | + expect($result2->isError)->toBeFalse() |
| 96 | + ->and($response2['value'])->toBe('MODIFIED_BY_TEST'); // Using updated code, not cached |
97 | 97 | } finally { |
98 | 98 | $cleanup(); |
99 | 99 | } |
|
0 commit comments