MediaWiki REL1_31
|
@uses XhprofData @uses AutoLoader More...
Public Member Functions | |
provideSplitKey () | |
testCompleteMetricsStructure () | |
Validate the structure of data returned by Xhprof::getCompleteMetrics(). | |
testCriticalPath () | |
XhprofData::getCriticalPath @uses XhprofData. | |
testEdges () | |
XhprofData::getCallers XhprofData::getCallees @uses XhprofData. | |
testInclude () | |
XhprofData::pruneData. | |
testInclusiveMetricsStructure () | |
Validate the structure of data returned by Xhprof::getInclusiveMetrics(). | |
testSplitKey ( $key, $expect) | |
XhprofData::splitKey provideSplitKey. | |
Protected Member Functions | |
assertArrayStructure ( $struct, $actual, $label=null) | |
Assert that the given array has the described structure. | |
getXhprofDataFixture (array $opts=[]) | |
Get an Xhprof instance that has been primed with a set of known testing data. | |
@uses XhprofData @uses AutoLoader
Definition at line 27 of file XhprofDataTest.php.
|
protected |
Assert that the given array has the described structure.
array | $struct | Array of key => type mappings |
array | $actual | Array to check |
string | $label |
Definition at line 270 of file XhprofDataTest.php.
References $type.
Referenced by testCompleteMetricsStructure(), and testInclusiveMetricsStructure().
|
protected |
Get an Xhprof instance that has been primed with a set of known testing data.
Tests for the Xhprof class should laregly be concerned with evaluating the manipulations of the data collected by xhprof rather than the data collection process itself.
The returned Xhprof instance primed will be with a data set created by running this trivial program using the PECL xhprof implementation:
Definition at line 216 of file XhprofDataTest.php.
Referenced by testCompleteMetricsStructure(), testCriticalPath(), testEdges(), testInclude(), and testInclusiveMetricsStructure().
XhprofDataTest::provideSplitKey | ( | ) |
Definition at line 39 of file XhprofDataTest.php.
XhprofDataTest::testCompleteMetricsStructure | ( | ) |
Validate the structure of data returned by Xhprof::getCompleteMetrics().
This acts as a guard against unexpected structural changes to the returned data in lieu of using a more heavy weight typed response object.
XhprofData::getCompleteMetrics
Definition at line 114 of file XhprofDataTest.php.
References $type, assertArrayStructure(), and getXhprofDataFixture().
XhprofDataTest::testCriticalPath | ( | ) |
XhprofData::getCriticalPath @uses XhprofData.
Definition at line 175 of file XhprofDataTest.php.
References $last, $value, getXhprofDataFixture(), list, and XhprofData\splitKey().
XhprofDataTest::testEdges | ( | ) |
XhprofData::getCallers XhprofData::getCallees @uses XhprofData.
Definition at line 159 of file XhprofDataTest.php.
References getXhprofDataFixture().
XhprofDataTest::testInclude | ( | ) |
Definition at line 53 of file XhprofDataTest.php.
References getXhprofDataFixture().
XhprofDataTest::testInclusiveMetricsStructure | ( | ) |
Validate the structure of data returned by Xhprof::getInclusiveMetrics().
This acts as a guard against unexpected structural changes to the returned data in lieu of using a more heavy weight typed response object.
XhprofData::getInclusiveMetrics
Definition at line 72 of file XhprofDataTest.php.
References $type, assertArrayStructure(), and getXhprofDataFixture().
XhprofDataTest::testSplitKey | ( | $key, | |
$expect ) |
XhprofData::splitKey provideSplitKey.
Definition at line 35 of file XhprofDataTest.php.
References XhprofData\splitKey().