From faebeca64beeeff26c6c26a11d58f8663224c227 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Thu, 7 Jul 2022 22:53:34 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/basic.php | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/basic.php b/tests/phpunit/tests/basic.php index 31b79b7937..c9e752ecf7 100644 --- a/tests/phpunit/tests/basic.php +++ b/tests/phpunit/tests/basic.php @@ -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 = <<Assign Authors