Ray is a great companion when debugging a test. However, in busy integration tests it can be hard to find out which logs matter and which don’t.

class CommentTest extends TestCase { public function test_a_user_can_post_a_comment(): void { ray()->clearScreen()->disable(); // Arrange ray()->enable(); // Act // Assert }} ray()->clearScreen() clears the output in Ray to start with a clean slate.

After arranging the test, ray()->enable() turns Ray back on, and we act on our test subject.

class CommentTest extends TestCase { public function setUp(): void { parent::setUp(); ray()->clearScreen()->disable(); } public function test_a_user_can_post_a_comment(): void { // Arrange ray()->enable(); // Act // Assert }}
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners