DoctorTestCase::assertStringContains PHP Method

assertStringContains() public method

Can be set to ignore insignificant whitespace in HTML output. Any whitespace in $expected is then allowed to be expanded in $string. If you want to capture whitespace in $string which may also be completely absent, use a pipe in $expected (e.g. '|A cell|'). If $expected happens to contain a literal pipe, escape it with another pipe ('||').
public assertStringContains ( string $expected, string $string, boolean $ignoreInsigificantWhitespace = false ) : boolean
$expected string the needle
$string string the haystack
$ignoreInsigificantWhitespace boolean allows for additional space, tab and newline chars
return boolean
    function assertStringContains($expected, $string, $ignoreInsigificantWhitespace = false)
    {
        $contained = $this->inStr($string, $expected, $ignoreInsigificantWhitespace);
        return $this->assertTrue($contained);
    }