Contains

Inspecting and debugging long strings for specific words can be tiresome and time consuming. Use the method contains() to check if the payload contains a specific string.

$html   = '<select name="select-choice" id="select-choice"><option value="Choice 1">Choice 1</option><option value="Choice 2">Choice 2</option><option value="Choice 3">Choice 3</option></select>';

ds($html)->contains('Choice 3');

$string   = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quibusdam, quidem?';
$expected = 'muspi';

ds($string)->contains($expected);
Contains

Last updated