Summary: We use custom `assert*` functions here and there. Remove them from backtrace.
Test Plan: Ran `XHPASTTreeTestCase`.
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D6411
$expect = PhutilReadableSerializer::printableValue($expect);
$result = PhutilReadableSerializer::printableValue($result);
- $where = debug_backtrace();
- $where = array_shift($where);
+ foreach (debug_backtrace() as $location) {
+ if (!preg_match('/^assert[A-Z]/', idx($location, 'function'))) {
+ break;
+ }
+ $where = $location;
+ }
$line = idx($where, 'line');
$file = basename(idx($where, 'file'));