Docs: Fix typo in _validate_cache_id() description.

Includes:
* Capitalizing "ID" in a consistent way.
* Expanding the comment on not using `filter_var()`.
* Adding a `@covers` tag for the function in unit tests.
* Minor tweak to the `_doing_it_wrong()` message.

Follow-up to [53818], [55543].

See #57593.

git-svn-id: https://develop.svn.wordpress.org/trunk@55549 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2023-03-14 16:53:07 +00:00
parent d55ca1215a
commit 200868214a
3 changed files with 16 additions and 11 deletions
@@ -7,6 +7,7 @@
* @group cache
*
* @covers ::_get_non_cached_ids
* @covers ::_validate_cache_id
*/
class Tests_Functions_GetNonCachedIds extends WP_UnitTestCase {
@@ -28,7 +29,7 @@ class Tests_Functions_GetNonCachedIds extends WP_UnitTestCase {
*
* @dataProvider data_valid_ids_should_be_returned_as_integers
*
* @param mixed $object_id The object id.
* @param mixed $object_id The object ID.
*/
public function test_valid_ids_should_be_returned_as_integers( $object_id ) {
$this->assertSame(
@@ -69,7 +70,7 @@ class Tests_Functions_GetNonCachedIds extends WP_UnitTestCase {
*
* @dataProvider data_invalid_cache_ids_should_throw_a_notice
*
* @param mixed $object_id The object id.
* @param mixed $object_id The object ID.
*/
public function test_invalid_cache_ids_should_throw_a_notice( $object_id ) {
$this->setExpectedIncorrectUsage( '_get_non_cached_ids' );