src/Expectation.php
protected function _log($boolean, $data = [])
    {
        $not = $this->_not;
        $pass = $not ? !$boolean : $boolean;
        if ($pass) {
            $data['type'] = 'passed';
        } else {
            $data['type'] = 'failed';
            $this->_passed = false;
        }

        $description = $data['description'];
        if (is_array($description)) {
            $data['data'] = $description['data'];
            $data['description'] = $description['description'];
        }
        $data += ['backtrace' => Debugger::backtrace()];
        $data['not'] = $not;

        $this->_logs[] = $data;
        $this->_not = false;
        return $boolean;
    }
protected function _log($boolean, $data = [])
    {
        $not = $this->_not;
        $pass = $not ? !$boolean : $boolean;
        if ($pass) {
            $data['type'] = 'passed';
        } else {
            $data['type'] = 'failed';
            $this->_passed = false;
        }

        $description = $data['description'];
        if (is_array($description)) {
            $data['data'] = $description['data'];
            $data['description'] = $description['description'];
        }
        $data += ['backtrace' => Debugger::backtrace()];
        $data['not'] = $not;

        $this->_logs[] = $data;
        $this->_not = false;
        return $boolean;
    }
protected function _log ( $ boolean , $ data = [ ] ) { $ not = $ this -> _not ; $ pass = $ not ? ! $ boolean : $ boolean ; if ( $ pass ) { $ data [ 'type' ] = 'passed' ; } else { $ data [ 'type' ] = 'failed' ; $ this -> _passed = false ; } $ description = $ data [ 'description' ] ; if ( is_array ( $ description ) ) { $ data [ 'data' ] = $ description [ 'data' ] ; $ data [ 'description' ] = $ description [ 'description' ] ; } $ data += [ 'backtrace' => Debugger :: backtrace ( ) ] ; $ data [ 'not' ] = $ not ; $ this -> _logs [ ] = $ data ; $ this -> _not = false ; return $ boolean ; }
Logs a result.

@param  boolean $boolean Set `true` for success and `false` for failure.
@param  array   $data    Test details array.
@return boolean
Logs a result .