lithium\test\Unit::_runTestMethod PHP Метод

_runTestMethod() защищенный Метод

Runs an individual test method, collecting results and catching exceptions along the way.
protected _runTestMethod ( string $method, array $options ) : mixed
$method string The name of the test method to run.
$options array
Результат mixed
    protected function _runTestMethod($method, $options)
    {
        try {
            $this->setUp();
        } catch (Exception $e) {
            $this->_handleException($e, __LINE__ - 2);
            return $this->_results;
        }
        $params = compact('options', 'method');
        $passed = $this->_filter(__CLASS__ . '::run', $params, function ($self, $params, $chain) {
            try {
                $method = $params['method'];
                $lineFlag = __LINE__ + 1;
                $self->{$method}();
            } catch (Exception $e) {
                $self->invokeMethod('_handleException', array($e));
            }
        });
        foreach ($this->_expected as $expected) {
            $this->_result('fail', compact('method') + array('class' => get_class($this), 'message' => "Expected exception matching `{$expected}` uncaught.", 'data' => array(), 'file' => null, 'line' => null, 'assertion' => 'expectException'));
        }
        $this->_expected = array();
        try {
            $this->tearDown();
        } catch (Exception $e) {
            $this->_handleException($e, __LINE__ - 2);
        }
        return $passed;
    }