mirror of
git://develop.git.wordpress.org/
synced 2025-04-22 05:02:34 +02:00
Build/Test Tools: Revert [51602] for now to investigate test failures on PHPUnit < 7.0.
See #46149. git-svn-id: https://develop.svn.wordpress.org/trunk@51603 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7a6dbf5056
commit
f7a7025899
@ -888,11 +888,54 @@ abstract class WP_UnitTestCase_Base extends PHPUnit_Adapter_TestCase {
|
||||
*
|
||||
* This is a custom extension of the PHPUnit requirements handling.
|
||||
*
|
||||
* Contains legacy code for skipping tests that are associated with an open Trac ticket.
|
||||
* Core tests no longer support this behaviour.
|
||||
*
|
||||
* @since 3.5.0
|
||||
* @deprecated 5.9.0 This method has not been functional since PHPUnit 7.0.
|
||||
*/
|
||||
protected function checkRequirements() {
|
||||
return;
|
||||
parent::checkRequirements();
|
||||
|
||||
$annotations = $this->getAnnotations();
|
||||
|
||||
$groups = array();
|
||||
if ( ! empty( $annotations['class']['group'] ) ) {
|
||||
$groups = array_merge( $groups, $annotations['class']['group'] );
|
||||
}
|
||||
if ( ! empty( $annotations['method']['group'] ) ) {
|
||||
$groups = array_merge( $groups, $annotations['method']['group'] );
|
||||
}
|
||||
|
||||
if ( ! empty( $groups ) ) {
|
||||
if ( in_array( 'ms-required', $groups, true ) ) {
|
||||
$this->skipWithoutMultisite();
|
||||
}
|
||||
|
||||
if ( in_array( 'ms-excluded', $groups, true ) ) {
|
||||
$this->skipWithMultisite();
|
||||
}
|
||||
}
|
||||
|
||||
// Core tests no longer check against open Trac tickets,
|
||||
// but others using WP_UnitTestCase may do so.
|
||||
if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( WP_TESTS_FORCE_KNOWN_BUGS ) {
|
||||
return;
|
||||
}
|
||||
$tickets = PHPUnit_Util_Test::getTickets( get_class( $this ), $this->getName( false ) );
|
||||
foreach ( $tickets as $ticket ) {
|
||||
if ( is_numeric( $ticket ) ) {
|
||||
$this->knownWPBug( $ticket );
|
||||
} elseif ( 0 === strpos( $ticket, 'Plugin' ) ) {
|
||||
$ticket = substr( $ticket, 6 );
|
||||
if ( $ticket && is_numeric( $ticket ) ) {
|
||||
$this->knownPluginBug( $ticket );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -915,6 +958,7 @@ abstract class WP_UnitTestCase_Base extends PHPUnit_Adapter_TestCase {
|
||||
* Skips the current test if there is an open Unit Test Trac ticket associated with it.
|
||||
*
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @deprecated No longer used since the Unit Test Trac was merged into the Core Trac.
|
||||
*
|
||||
* @param int $ticket_id Ticket number.
|
||||
|
Loading…
x
Reference in New Issue
Block a user