Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Move code from matchers to formatters #436

Merged

Conversation

tienvx
Copy link
Contributor

@tienvx tienvx commented Dec 31, 2023

  • Create 3 formatters
    • MinimalFormatter
    • ValueOptionalFormatter
    • ValueRequiredFormatter
  • Move code from matchers to formatters
  • Default formatter is ValueOptionalFormatter

@@ -21,6 +21,6 @@ protected function setUp(): void
public function testSerialize(?string $value, string $json): void
{
$this->matcher = new StringValue($value);
$this->assertSame($json, json_encode($this->matcher));
$this->assertJsonStringEqualsJsonString($json, json_encode($this->matcher));
Copy link
Collaborator

Choose a reason for hiding this comment

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

no need for change, but see also: sebastianbergmann/phpunit#4584

Copy link
Contributor Author

Choose a reason for hiding this comment

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

noted. Thank you!

@tienvx tienvx merged commit a814a4d into pact-foundation:ffi Dec 31, 2023
24 of 30 checks passed
@tienvx tienvx deleted the move-code-from-matchers-to-formatters branch December 31, 2023 15:03
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.

None yet

2 participants