Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsUnitTestTrait: update test class list #2050

Merged
merged 1 commit into from
May 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions WordPress/Helpers/IsUnitTestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,21 @@ trait IsUnitTestTrait {
* @var string[]
*/
protected $known_test_classes = array(
'WP_UnitTestCase_Base' => true,
// Base test cases.
'WP_UnitTestCase' => true,
'WP_UnitTestCase_Base' => true,
'PHPUnit_Adapter_TestCase' => true,

// Domain specific base test cases.
'WP_Ajax_UnitTestCase' => true,
'Block_Supported_Styles_Test' => true,
'WP_Canonical_UnitTestCase' => true,
'WP_Test_REST_TestCase' => true,
'WP_Test_REST_Controller_Testcase' => true,
'WP_Test_REST_Post_Type_Controller_Testcase' => true,
'WP_Test_REST_TestCase' => true,
'WP_Test_XML_TestCase' => true,
'WP_XMLRPC_UnitTestCase' => true,

// PHPUnit native test cases.
'PHPUnit_Framework_TestCase' => true,
'PHPUnit\Framework\TestCase' => true,
// PHPUnit native TestCase class when imported via use statement.
Expand Down