features/bootstrap/FeatureContext.php
public function iShouldGetALogEntryContaining($string)
    {
        $found = false;
        foreach (explode("\n", $this->getOutput()) as $line) {
            if (strpos(trim($line), $string) !== false) {
                $found = true;
            }
        }

        if (!$found) {
            throw new \Exception(
                "Actual output is:\n" . $this->getOutput()
            );
        }
    }
public function iShouldGetALogEntryContaining($string)
    {
        $found = false;
        foreach (explode("\n", $this->getOutput()) as $line) {
            if (strpos(trim($line), $string) !== false) {
                $found = true;
            }
        }

        if (!$found) {
            throw new \Exception(
                "Actual output is:\n" . $this->getOutput()
            );
        }
    }
public function iShouldGetALogEntryContaining ( $ string ) { $ found = false ; foreach ( explode ( "\n" , $ this -> getOutput ( ) ) as $ line ) { if ( strpos ( trim ( $ line ) , $ string ) !== false ) { $ found = true ; } } if ( ! $ found ) { throw new \ Exception ( "Actual output is:\n" . $ this -> getOutput ( ) ) ; } }
Verifies whether a log entry contains the given substring.

@param string $string

@Then /^I should get a log entry containing "([^"]*)"$/

@throws \Exception if the condition is not fulfilled

@return void
Verifies whether a log entry contains the given substring .