Skip to content

test: add dbsafeString coverage#97

Open
romankonz wants to merge 2 commits intofix/phpstanfrom
test/dbsafe-string-coverage
Open

test: add dbsafeString coverage#97
romankonz wants to merge 2 commits intofix/phpstanfrom
test/dbsafe-string-coverage

Conversation

@romankonz
Copy link
Copy Markdown

Summary

  • Adds testDbsafeString to ConnectionTest with 19 table-driven cases.
  • Covers existing behavior (null, int, float, bool, plain string, htmlspecialchars, addslashes, flag toggles) and the new unwrap branches from fix: PHPStan findings #96 (BackedEnum, EscapeableParameterInterface).
  • Each unwrap branch is exercised against passthrough + htmlspecialchars + addslashes independently (no white-box reliance on the post-unwrap path).
  • New fixtures: tests/Fixtures/StringBackedEnum.php, IntBackedEnum.php, EscapeableValue.php.

Base branch is #96 (fix/phpstan); merge that first.

🤖 Generated with Claude Code

romankonz and others added 2 commits May 3, 2026 21:06
Adds a table-driven test covering scalar/null/bool passthrough,
htmlspecialchars/addslashes flag toggles, and the BackedEnum and
EscapeableParameterInterface unwrap branches added in #96.

Test fixtures live under tests/Fixtures/.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds four rows verifying that htmlSpecialChars=false / addSlashes=false
are still honored when the value arrives via a BackedEnum or
EscapeableParameterInterface, without relying on the implementation
joining the post-unwrap path with the plain-string path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@romankonz romankonz mentioned this pull request May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant