src/AssertMatchedTrait.php
private static function assertStringMatched(string $pattern, string $actual, string $message = ''): void
    {
        static::assertThat($actual, new StringConstraint($pattern), $message);
    }
private static function assertStringMatched(string $pattern, string $actual, string $message = ''): void
    {
        static::assertThat($actual, new StringConstraint($pattern), $message);
    }
Reports an error identified by $message if $actual JSON string is not matched $pattern.

If both the presence and the value are important, then place the value in the pattern
If only the presence of a field is important, then place the "***" in the pattern
If both the presence and the value are NOT important, then do not place anything in pattern

@example assertStringMatched('cu***mber', 'cucumber')

@param string $pattern
@param string $actual
@param string $message