本文整理汇总了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]');
}