Skip to content

assertStringContainsString doesn't display the specified message #315

@efcor

Description

@efcor

Hi, I was directed to this repo by @crynobone for an output issue I noticed in Laravel Dusk, and we think the issue actually lies in this repo. See laravel/dusk#1146.

Essentially, if I do $this->assertStringContainsString('foo', 'bar', 'My custom message.'); in a Dusk test (clean Laravel install and Dusk install), the "My custom message" is missing from the output. However, if I do $this->assertSame('foo', 'bar', 'My custom message.'); the "My custom message" is present in the output.

$this->assertSame('foo', 'bar', 'My custom message.');
Screenshot 2024-10-24 at 11 27 48 AM

$this->assertStringContainsString('foo', 'bar', 'My custom message.');
Screenshot 2024-10-24 at 11 27 57 AM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions