Example #1
0
 /**
  *    Uses a stack trace to find the line of an assertion.
  *    @access public
  *    @static
  */
 function getExpectationLine()
 {
     $trace = new SimpleStackTrace(array('expect'));
     return $trace->traceMethod();
 }
Example #2
0
 /**
  *    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();
 }
 /**
  *    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();
 }
Example #4
0
 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]');
 }