dusk
dusk copied to clipboard
assertStringContainsString doesn't display the specified message
Dusk Version
8.2.9
Laravel Version
11.28.1
PHP Version
8.3.12
PHPUnit Version
11.4.2
Database Driver & Version
No response
Description
When doing $this->assertStringContainsString('foo', 'bar', 'My custom message.'); in a test, Dusk's output for that test does not display "My custom message." I double checked and assertStringContainsString does have a third parameter for a message, similar to assertSame.
If you do $this->assertSame('foo', 'bar', 'My custom message.'); in a test, Dusk's output for that test will render "My custom message" as expected.
$this->assertSame('foo', 'bar', 'My custom message.');
$this->assertStringContainsString('foo', 'bar', 'My custom message.');
Steps To Reproduce
Be on Mac OS 14.6.1 (Apple Silicon) Have Chrome Version 130.0.6723.59 (Official Build) (arm64)
Run: laravel new laravel (no scaffolding etc in the wizard) composer require laravel/dusk --dev cd laravel herd link
php artisan dusk:install php artisan dusk:chrome-driver
Add $this->assertStringContainsString('foo', 'bar', 'My custom message.'); to the Tests\Browser\ExampleTest test.
Run php artisan dusk.