本文整理汇总了PHP中SimpleStackTrace::traceMethod方法的典型用法代码示例。如果您正苦于以下问题:PHP SimpleStackTrace::traceMethod方法的具体用法?PHP SimpleStackTrace::traceMethod怎么用?PHP SimpleStackTrace::traceMethod使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleStackTrace
的用法示例。
在下文中一共展示了SimpleStackTrace::traceMethod方法的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]');
}