Skip to content

Add regex assert methods - #69

Merged
frankdekker merged 5 commits into
masterfrom
Add-regex-assert-methods
Aug 11, 2026
Merged

Add regex assert methods#69
frankdekker merged 5 commits into
masterfrom
Add-regex-assert-methods

Conversation

@frankdekker

Copy link
Copy Markdown
Member

Adds:

  • Assert::regex(string, pattern, message?)
  • Assert::notRegex(string, pattern, message?)

Copilot AI lite review requested due to automatic review settings August 9, 2026 08:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds two new fluent assertion helpers to DR\Utils\Assert for regex matching and non-matching, along with unit tests and README documentation updates.

Changes:

  • Added Assert::regex() and Assert::notRegex() methods to validate strings against a regex pattern.
  • Added unit tests covering success and failure cases for both assertions.
  • Documented the new assertion methods in the README method list.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tests/Unit/AssertTest.php Adds unit tests for regex / notRegex success and failure messages.
src/Assert.php Implements the new regex / notRegex assertion methods.
README.md Lists the new assertion methods in the public API overview.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/Assert.php
Comment thread src/Assert.php
@frankdekker
frankdekker requested a review from bram123 August 9, 2026 08:33
Comment thread src/Assert.php Outdated
@frankdekker
frankdekker merged commit cfe6320 into master Aug 11, 2026
8 checks passed
@frankdekker
frankdekker deleted the Add-regex-assert-methods branch August 11, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants