Build/Test Tools: Add @coversNothing tags to the tests for some content in documentation and settings files.

Props pbeane, hellofromTonya, ironprogrammer, antonvlasenko, SergeyBiryukov, costdev.
See #39265.

git-svn-id: https://develop.svn.wordpress.org/trunk@53683 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2022-07-07 22:53:34 +00:00
parent 4790a10b8b
commit faebeca64b

View File

@ -3,10 +3,15 @@
/**
* just make sure the test framework is working
*
* No Covers as this checks for content in files
*
* @group testsuite
*/
class Tests_Basic extends WP_UnitTestCase {
/**
* @coversNothing
*/
public function test_license() {
// This test is designed to only run on trunk.
$this->skipOnAutomatedBranches();
@ -19,6 +24,9 @@ class Tests_Basic extends WP_UnitTestCase {
$this->assertSame( $this_year, $license_year, "license.txt's year needs to be updated to $this_year." );
}
/**
* @coversNothing
*/
public function test_security_md() {
// This test is designed to only run on trunk.
$this->skipOnAutomatedBranches();
@ -32,6 +40,9 @@ class Tests_Basic extends WP_UnitTestCase {
$this->assertContains( $latest_stable, $supported_versions, "SECURITY.md's version needs to be updated to $latest_stable." );
}
/**
* @coversNothing
*/
public function test_package_json() {
$package_json = file_get_contents( dirname( ABSPATH ) . '/package.json' );
$package_json = json_decode( $package_json, true );
@ -49,14 +60,19 @@ class Tests_Basic extends WP_UnitTestCase {
/**
* @depends test_package_json
*
* @coversNothing
*/
public function test_package_json_node_engine( $package_json ) {
$this->assertArrayHasKey( 'engines', $package_json );
$this->assertArrayHasKey( 'node', $package_json['engines'] );
}
// Test some helper utility functions.
/**
* Test some helper utility functions.
*
* @coversNothing
*/
public function test_strip_ws() {
$this->assertSame( '', strip_ws( '' ) );
$this->assertSame( 'foo', strip_ws( 'foo' ) );
@ -84,6 +100,9 @@ class Tests_Basic extends WP_UnitTestCase {
}
/**
* @coversNothing
*/
public function test_mask_input_value() {
$in = <<<EOF
<h2>Assign Authors</h2>