Repository navigation
Conversation
added 4 commits
November 16, 2026 18:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Raises the mutation score of the package from 85.47 % to 95.56 % (Pest
--mutate --everything --covered-only, 516 mutants, 23 left), with tests only: nothing outsidetests/changes and no existing test is weakened.Why this repository first. Its mutation run did not even start:
tests/helpers/wp.phpwas loaded twice. Pest loadstests/Helpers/*.phpby itself, the folder was spelledhelpers, andPest.phpalso included the files. On macOS (a case-insensitive file system) both paths are the same folder, so the file was declared twice (Cannot redeclare function wp_parse_str()), on Linux the folderHelpersdoes not exist and nothing showed. The folder is nowtests/Helpers, as Pest expects, and theincludelines are gone.What the survivors said.
->not->toHaveKeys([...])passes as soon as one of the keys is missing, so ten assertions never proved thatoffset,pagedand the like were absent. AtoLackKeysexpectation (intests/Pest.php) fails if any of the keys is present, and replaces them. They all passed: there was no hidden defect, only weak assertions.halias for the hour), value types (0and1are booleans before they are numbers, signed below zero, the widest numeric type of a list),exists()ignoring paging and sticky posts,pluck()andexists()not asking for a total, lists whatever keys WordPress gives them, a type written in capitals.What stays. 23 mutants, mostly equivalent: a cast on a value the test doubles already type (
found_posts,get_total()),ucfirst()on a PHP class name (case-insensitive),array_values()on a list already built fromarray_unique()(key 0 always survives),NullableType(the fallback type isCHARtoo),searchById()re-setting the default field.New files:
tests/Feature/AllowedValuesTest.php(56 tests) andtests/Feature/EdgeCasesTest.php(53). 429 tests pass, in random order (3 seeds) and in a Linux container (php:8.4-cli). Pint is clean. The.harness.jsonratchet is not touched: the workflow does not run--mutationyet.