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

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

        if (!$found) {
            throw new \Exception(
                "Actual output is:\n" . $this->getOutput()
            );
        }
    }
public function iShouldGetALogEntry ( $ string ) { $ found = false ; foreach ( explode ( "\n" , $ this -> getOutput ( ) ) as $ line ) { if ( trim ( $ line ) == $ string ) { $ found = true ; } } if ( ! $ found ) { throw new \ Exception ( "Actual output is:\n" . $ this -> getOutput ( ) ) ; } }
Verifies whether one of the log entries is the same as the given.

Please note that this method exactly checks the given except for leading
and trailing spaces and control characters; those are stripped first.

@param string $string

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

@throws \Exception if the condition is not fulfilled

@return void
Verifies whether one of the log entries is the same as the given .