本文整理匯總了PHP中SimpleStackTrace類的典型用法代碼示例。如果您正苦於以下問題:PHP SimpleStackTrace類的具體用法?PHP SimpleStackTrace怎麽用?PHP SimpleStackTrace使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了SimpleStackTrace類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getExpectationLine
/**
* Uses a stack trace to find the line of an assertion.
* @access public
* @static
*/
function getExpectationLine()
{
$trace = new SimpleStackTrace(array('expect'));
return $trace->traceMethod();
}
示例2: getAssertionLine
/**
* Uses a stack trace to find the line of an assertion.
* @return string Line number of first assert*
* method embedded in format string.
*/
public function getAssertionLine()
{
$trace = new SimpleStackTrace(array('assert', 'expect', 'pass', 'fail', 'skip'));
return $trace->traceMethod();
}
示例3: getAssertionLine
/**
* Uses a stack trace to find the line of an assertion.
* @return string Line number of first assert*
* method embedded in format string.
* @access public
*/
function getAssertionLine()
{
$trace = new SimpleStackTrace(array('assert', 'click', 'pass', 'fail'));
return $trace->traceMethod();
}
示例4: testCanFindAssertInTrace
function testCanFindAssertInTrace()
{
$trace = new SimpleStackTrace(array('assert'));
$this->assertEqual($trace->traceMethod(array(array('file' => '/my_test.php', 'line' => 24, 'function' => 'assertSomething'))), ' at [/my_test.php line 24]');
}