src/Concerns/MakesAssertions.php
public function assertSourceHas($code)
    {
        PHPUnit::assertTrue(
            Str::contains($this->driver->getPageSource(), $code),
            "Did not find expected source code [{$code}]"
        );

        return $this;
    }
public function assertSourceHas($code)
    {
        PHPUnit::assertTrue(
            Str::contains($this->driver->getPageSource(), $code),
            "Did not find expected source code [{$code}]"
        );

        return $this;
    }
public function assertSourceHas ( $ code ) { PHPUnit :: assertTrue ( Str :: contains ( $ this -> driver -> getPageSource ( ) , $ code ) , "Did not find expected source code [{$code}]" ) ; return $ this ; }
Assert that the given source code is present on the page.

@param  string  $code
@return $this
Assert that the given source code is present on the page .