Runs an individual test method, collecting results and catching exceptions along the way.

Parameters

  • string $method The name of the test method to run.
  • array $options

Returns

mixed
This method can be filtered.

Source

						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));
			}
		});
		$this->tearDown();

		return $passed;
	}