mirror of
git://develop.git.wordpress.org/
synced 2025-01-16 20:38:35 +01:00
Build/Test Tools: Remove SpeedTrapListener.
Now that the tests can run PHPUnit cross-version and Composer will be used to install the test suite in CI, we could switch out the local copies of the [https://github.com/johnkary/phpunit-speedtrap PHPUnit speedtrap] package in favor of using the Composer package, which would prevent us having to make the WP local copies of the class compatible with later PHPUnit versions. The SpeedTrap test listener was introduced to identify slow tests and take action on these to make them faster. In practice, however, no notable action was ever taken based on the output of the test listener in all the years it was in place. With that in mind, it was decided to remove the SpeedTrap test listeners without replacement. If – at a future date – contributors would want to take action to speed up slow tests anyway, they can: * Either add the package to their local install and use the output they receive locally to identify slow tests. * Or use the PHPUnit native `@small` annotations in combination with the PHPUnit `PHP_Invoker` package as described in the PHPUnit documentation to [https://phpunit.readthedocs.io/en/stable/risky-tests.html#test-execution-timeout run tests with time limits]. Follow-up to [35214], [35226], [35767], [44701], [51559-51572]. Props jrf. See #46149. git-svn-id: https://develop.svn.wordpress.org/trunk@51573 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e8ea993ce7
commit
aae784273f
@ -135,7 +135,6 @@
|
||||
<exclude-pattern>/src/wp-includes/Text/*</exclude-pattern>
|
||||
|
||||
<exclude-pattern>/tests/phpunit/includes/phpunit7/MockObject/*</exclude-pattern>
|
||||
<exclude-pattern>/tests/phpunit/includes/speed-trap-listener\.php</exclude-pattern>
|
||||
|
||||
<!-- Test data and fixtures. -->
|
||||
<exclude-pattern>/tests/phpunit/build*</exclude-pattern>
|
||||
@ -266,7 +265,6 @@
|
||||
<element value="WP_PHPUnit_Util_Getopt"/>
|
||||
<element value="PHPUnit_Util_Test"/>
|
||||
<element value="WPProfiler"/>
|
||||
<element value="SpeedTrapListener"/>
|
||||
<element value="PHPUnit_Framework_Exception"/>
|
||||
<element value="Polyfill_TestCase"/>
|
||||
</property>
|
||||
|
@ -29,17 +29,6 @@
|
||||
<php>
|
||||
<const name="WP_RUN_CORE_TESTS" value="1" />
|
||||
</php>
|
||||
<listeners>
|
||||
<listener class="SpeedTrapListener" file="tests/phpunit/includes/listener-loader.php">
|
||||
<arguments>
|
||||
<array>
|
||||
<element key="slowThreshold">
|
||||
<integer>150</integer>
|
||||
</element>
|
||||
</array>
|
||||
</arguments>
|
||||
</listener>
|
||||
</listeners>
|
||||
<filter>
|
||||
<whitelist addUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">src</directory>
|
||||
|
@ -1,7 +0,0 @@
|
||||
<?php
|
||||
|
||||
if ( version_compare( tests_get_phpunit_version(), '7.0', '>=' ) ) {
|
||||
require __DIR__ . '/phpunit7/speed-trap-listener.php';
|
||||
} else {
|
||||
require __DIR__ . '/speed-trap-listener.php';
|
||||
}
|
@ -1,307 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* A PHPUnit TestListener that exposes your slowest running tests by outputting
|
||||
* results directly to the console.
|
||||
*/
|
||||
class SpeedTrapListener implements PHPUnit_Framework_TestListener {
|
||||
|
||||
/**
|
||||
* Internal tracking for test suites.
|
||||
*
|
||||
* Increments as more suites are run, then decremented as they finish. All
|
||||
* suites have been run when returns to 0.
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
protected $suites = 0;
|
||||
|
||||
/**
|
||||
* Time in milliseconds at which a test will be considered "slow" and be
|
||||
* reported by this listener.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $slow_threshold;
|
||||
|
||||
/**
|
||||
* Number of tests to report on for slowness.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $report_length;
|
||||
|
||||
/**
|
||||
* Collection of slow tests.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $slow = array();
|
||||
|
||||
/**
|
||||
* Construct a new instance.
|
||||
*
|
||||
* @param array $options
|
||||
*/
|
||||
public function __construct( array $options = array() ) {
|
||||
$this->loadOptions( $options );
|
||||
}
|
||||
|
||||
/**
|
||||
* An error occurred.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*/
|
||||
public function addError( PHPUnit\Framework\Test $test, Throwable $t, float $time ): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* A warning occurred.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param PHPUnit_Framework_Warning $e
|
||||
* @param float $time
|
||||
* @since Method available since Release 5.1.0
|
||||
*/
|
||||
public function addWarning( PHPUnit\Framework\Test $test, PHPUnit\Framework\Warning $e, float $time ): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* A failure occurred.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param PHPUnit_Framework_AssertionFailedError $e
|
||||
* @param float $time
|
||||
*/
|
||||
public function addFailure( PHPUnit\Framework\Test $test, PHPUnit\Framework\AssertionFailedError $e, float $time ): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* Incomplete test.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*/
|
||||
public function addIncompleteTest( PHPUnit\Framework\Test $test, Throwable $t, float $time ): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* Risky test.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function addRiskyTest( PHPUnit\Framework\Test $test, Throwable $t, float $time ): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* Skipped test.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*/
|
||||
public function addSkippedTest( PHPUnit\Framework\Test $test, Throwable $t, float $time ): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* A test started.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
*/
|
||||
public function startTest( PHPUnit\Framework\Test $test ): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* A test ended.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param float $time
|
||||
*/
|
||||
public function endTest( PHPUnit\Framework\Test $test, float $time ): void {
|
||||
if ( ! $test instanceof PHPUnit_Framework_TestCase ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$time = $this->toMilliseconds( $time );
|
||||
$threshold = $this->getSlowThreshold( $test );
|
||||
|
||||
if ( $this->isSlow( $time, $threshold ) ) {
|
||||
$this->addSlowTest( $test, $time );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A test suite started.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
*/
|
||||
public function startTestSuite( PHPUnit\Framework\TestSuite $suite ): void {
|
||||
$this->suites++;
|
||||
}
|
||||
|
||||
/**
|
||||
* A test suite ended.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
*/
|
||||
public function endTestSuite( PHPUnit\Framework\TestSuite $suite ): void {
|
||||
$this->suites--;
|
||||
|
||||
if ( 0 === $this->suites && $this->hasSlowTests() ) {
|
||||
arsort( $this->slow ); // Sort longest running tests to the top.
|
||||
|
||||
$this->renderHeader();
|
||||
$this->renderBody();
|
||||
$this->renderFooter();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the given test execution time is considered slow.
|
||||
*
|
||||
* @param int $time Test execution time in milliseconds
|
||||
* @param int $slow_threshold Test execution time at which a test should be considered slow (milliseconds)
|
||||
* @return bool
|
||||
*/
|
||||
protected function isSlow( $time, $slow_threshold ) {
|
||||
return $time >= $slow_threshold;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores a test as slow.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestCase $test
|
||||
* @param int $time Test execution time in milliseconds
|
||||
*/
|
||||
protected function addSlowTest( PHPUnit_Framework_TestCase $test, $time ) {
|
||||
$label = $this->makeLabel( $test );
|
||||
|
||||
$this->slow[ $label ] = $time;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether at least one test has been considered slow.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function hasSlowTests() {
|
||||
return ! empty( $this->slow );
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert PHPUnit's reported test time (microseconds) to milliseconds.
|
||||
*
|
||||
* @param float $time
|
||||
* @return int
|
||||
*/
|
||||
protected function toMilliseconds( $time ) {
|
||||
return (int) round( $time * 1000 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Label for describing a test.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestCase $test
|
||||
* @return string
|
||||
*/
|
||||
protected function makeLabel( PHPUnit_Framework_TestCase $test ) {
|
||||
return sprintf( '%s:%s', get_class( $test ), $test->getName() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate number of slow tests to report about.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
protected function getReportLength() {
|
||||
return min( count( $this->slow ), $this->report_length );
|
||||
}
|
||||
|
||||
/**
|
||||
* Find how many slow tests occurred that won't be shown due to list length.
|
||||
*
|
||||
* @return int Number of hidden slow tests
|
||||
*/
|
||||
protected function getHiddenCount() {
|
||||
$total = count( $this->slow );
|
||||
$showing = $this->getReportLength( $this->slow );
|
||||
|
||||
$hidden = 0;
|
||||
if ( $total > $showing ) {
|
||||
$hidden = $total - $showing;
|
||||
}
|
||||
|
||||
return $hidden;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders slow test report header.
|
||||
*/
|
||||
protected function renderHeader() {
|
||||
echo sprintf( "\n\nYou should really fix these slow tests (>%sms)...\n", $this->slow_threshold );
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders slow test report body.
|
||||
*/
|
||||
protected function renderBody() {
|
||||
$slow_tests = $this->slow;
|
||||
|
||||
$length = $this->getReportLength( $slow_tests );
|
||||
for ( $i = 1; $i <= $length; ++$i ) {
|
||||
$label = key( $slow_tests );
|
||||
$time = array_shift( $slow_tests );
|
||||
|
||||
echo sprintf( " %s. %sms to run %s\n", $i, $time, $label );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders slow test report footer.
|
||||
*/
|
||||
protected function renderFooter() {
|
||||
$hidden = $this->getHiddenCount( $this->slow );
|
||||
if ( $hidden ) {
|
||||
echo sprintf( '...and there %s %s more above your threshold hidden from view', 1 === $hidden ? 'is' : 'are', $hidden );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate options into class internals.
|
||||
*
|
||||
* @param array $options
|
||||
*/
|
||||
protected function loadOptions( array $options ) {
|
||||
$this->slow_threshold = isset( $options['slowThreshold'] ) ? $options['slowThreshold'] : 500;
|
||||
$this->report_length = isset( $options['reportLength'] ) ? $options['reportLength'] : 10;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get slow test threshold for given test. A TestCase can override the
|
||||
* suite-wide slow threshold by using the annotation @slowThreshold with
|
||||
* the threshold value in milliseconds.
|
||||
*
|
||||
* The following test will only be considered slow when its execution time
|
||||
* reaches 5000ms (5 seconds):
|
||||
*
|
||||
* <code>
|
||||
*
|
||||
* @slowThreshold 5000
|
||||
* public function testLongRunningProcess() {}
|
||||
* </code>
|
||||
*
|
||||
* @param PHPUnit_Framework_TestCase $test
|
||||
* @return int
|
||||
*/
|
||||
protected function getSlowThreshold( PHPUnit_Framework_TestCase $test ) {
|
||||
$ann = $test->getAnnotations();
|
||||
|
||||
return isset( $ann['method']['slowThreshold'][0] ) ? $ann['method']['slowThreshold'][0] : $this->slow_threshold;
|
||||
}
|
||||
}
|
@ -1,307 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* A PHPUnit TestListener that exposes your slowest running tests by outputting
|
||||
* results directly to the console.
|
||||
*/
|
||||
class SpeedTrapListener implements PHPUnit_Framework_TestListener {
|
||||
|
||||
/**
|
||||
* Internal tracking for test suites.
|
||||
*
|
||||
* Increments as more suites are run, then decremented as they finish. All
|
||||
* suites have been run when returns to 0.
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
protected $suites = 0;
|
||||
|
||||
/**
|
||||
* Time in milliseconds at which a test will be considered "slow" and be
|
||||
* reported by this listener.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $slow_threshold;
|
||||
|
||||
/**
|
||||
* Number of tests to report on for slowness.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $report_length;
|
||||
|
||||
/**
|
||||
* Collection of slow tests.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $slow = array();
|
||||
|
||||
/**
|
||||
* Construct a new instance.
|
||||
*
|
||||
* @param array $options
|
||||
*/
|
||||
public function __construct( array $options = array() ) {
|
||||
$this->loadOptions( $options );
|
||||
}
|
||||
|
||||
/**
|
||||
* An error occurred.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*/
|
||||
public function addError( PHPUnit_Framework_Test $test, Exception $e, $time ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* A warning occurred.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param PHPUnit_Framework_Warning $e
|
||||
* @param float $time
|
||||
* @since Method available since Release 5.1.0
|
||||
*/
|
||||
public function addWarning( PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, $time ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* A failure occurred.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param PHPUnit_Framework_AssertionFailedError $e
|
||||
* @param float $time
|
||||
*/
|
||||
public function addFailure( PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Incomplete test.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*/
|
||||
public function addIncompleteTest( PHPUnit_Framework_Test $test, Exception $e, $time ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Risky test.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function addRiskyTest( PHPUnit_Framework_Test $test, Exception $e, $time ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Skipped test.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*/
|
||||
public function addSkippedTest( PHPUnit_Framework_Test $test, Exception $e, $time ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* A test started.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
*/
|
||||
public function startTest( PHPUnit_Framework_Test $test ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* A test ended.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param float $time
|
||||
*/
|
||||
public function endTest( PHPUnit_Framework_Test $test, $time ) {
|
||||
if ( ! $test instanceof PHPUnit_Framework_TestCase ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$time = $this->toMilliseconds( $time );
|
||||
$threshold = $this->getSlowThreshold( $test );
|
||||
|
||||
if ( $this->isSlow( $time, $threshold ) ) {
|
||||
$this->addSlowTest( $test, $time );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A test suite started.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
*/
|
||||
public function startTestSuite( PHPUnit_Framework_TestSuite $suite ) {
|
||||
$this->suites++;
|
||||
}
|
||||
|
||||
/**
|
||||
* A test suite ended.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
*/
|
||||
public function endTestSuite( PHPUnit_Framework_TestSuite $suite ) {
|
||||
$this->suites--;
|
||||
|
||||
if ( 0 === $this->suites && $this->hasSlowTests() ) {
|
||||
arsort( $this->slow ); // Sort longest running tests to the top.
|
||||
|
||||
$this->renderHeader();
|
||||
$this->renderBody();
|
||||
$this->renderFooter();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the given test execution time is considered slow.
|
||||
*
|
||||
* @param int $time Test execution time in milliseconds
|
||||
* @param int $slow_threshold Test execution time at which a test should be considered slow (milliseconds)
|
||||
* @return bool
|
||||
*/
|
||||
protected function isSlow( $time, $slow_threshold ) {
|
||||
return $time >= $slow_threshold;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores a test as slow.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestCase $test
|
||||
* @param int $time Test execution time in milliseconds
|
||||
*/
|
||||
protected function addSlowTest( PHPUnit_Framework_TestCase $test, $time ) {
|
||||
$label = $this->makeLabel( $test );
|
||||
|
||||
$this->slow[ $label ] = $time;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether at least one test has been considered slow.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function hasSlowTests() {
|
||||
return ! empty( $this->slow );
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert PHPUnit's reported test time (microseconds) to milliseconds.
|
||||
*
|
||||
* @param float $time
|
||||
* @return int
|
||||
*/
|
||||
protected function toMilliseconds( $time ) {
|
||||
return (int) round( $time * 1000 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Label for describing a test.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestCase $test
|
||||
* @return string
|
||||
*/
|
||||
protected function makeLabel( PHPUnit_Framework_TestCase $test ) {
|
||||
return sprintf( '%s:%s', get_class( $test ), $test->getName() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate number of slow tests to report about.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
protected function getReportLength() {
|
||||
return min( count( $this->slow ), $this->report_length );
|
||||
}
|
||||
|
||||
/**
|
||||
* Find how many slow tests occurred that won't be shown due to list length.
|
||||
*
|
||||
* @return int Number of hidden slow tests
|
||||
*/
|
||||
protected function getHiddenCount() {
|
||||
$total = count( $this->slow );
|
||||
$showing = $this->getReportLength( $this->slow );
|
||||
|
||||
$hidden = 0;
|
||||
if ( $total > $showing ) {
|
||||
$hidden = $total - $showing;
|
||||
}
|
||||
|
||||
return $hidden;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders slow test report header.
|
||||
*/
|
||||
protected function renderHeader() {
|
||||
echo sprintf( "\n\nYou should really fix these slow tests (>%sms)...\n", $this->slow_threshold );
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders slow test report body.
|
||||
*/
|
||||
protected function renderBody() {
|
||||
$slow_tests = $this->slow;
|
||||
|
||||
$length = $this->getReportLength( $slow_tests );
|
||||
for ( $i = 1; $i <= $length; ++$i ) {
|
||||
$label = key( $slow_tests );
|
||||
$time = array_shift( $slow_tests );
|
||||
|
||||
echo sprintf( " %s. %sms to run %s\n", $i, $time, $label );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders slow test report footer.
|
||||
*/
|
||||
protected function renderFooter() {
|
||||
$hidden = $this->getHiddenCount( $this->slow );
|
||||
if ( $hidden ) {
|
||||
echo sprintf( '...and there %s %s more above your threshold hidden from view', 1 === $hidden ? 'is' : 'are', $hidden );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate options into class internals.
|
||||
*
|
||||
* @param array $options
|
||||
*/
|
||||
protected function loadOptions( array $options ) {
|
||||
$this->slow_threshold = isset( $options['slowThreshold'] ) ? $options['slowThreshold'] : 500;
|
||||
$this->report_length = isset( $options['reportLength'] ) ? $options['reportLength'] : 10;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get slow test threshold for given test. A TestCase can override the
|
||||
* suite-wide slow threshold by using the annotation @slowThreshold with
|
||||
* the threshold value in milliseconds.
|
||||
*
|
||||
* The following test will only be considered slow when its execution time
|
||||
* reaches 5000ms (5 seconds):
|
||||
*
|
||||
* <code>
|
||||
*
|
||||
* @slowThreshold 5000
|
||||
* public function testLongRunningProcess() {}
|
||||
* </code>
|
||||
*
|
||||
* @param PHPUnit_Framework_TestCase $test
|
||||
* @return int
|
||||
*/
|
||||
protected function getSlowThreshold( PHPUnit_Framework_TestCase $test ) {
|
||||
$ann = $test->getAnnotations();
|
||||
|
||||
return isset( $ann['method']['slowThreshold'][0] ) ? $ann['method']['slowThreshold'][0] : $this->slow_threshold;
|
||||
}
|
||||
}
|
@ -28,17 +28,6 @@
|
||||
<group>oembed-headers</group>
|
||||
</exclude>
|
||||
</groups>
|
||||
<listeners>
|
||||
<listener class="SpeedTrapListener" file="tests/phpunit/includes/listener-loader.php">
|
||||
<arguments>
|
||||
<array>
|
||||
<element key="slowThreshold">
|
||||
<integer>150</integer>
|
||||
</element>
|
||||
</array>
|
||||
</arguments>
|
||||
</listener>
|
||||
</listeners>
|
||||
<filter>
|
||||
<whitelist addUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">../../src</directory>
|
||||
|
Loading…
x
Reference in New Issue
Block a user