Skip to content

Conversation

@marcvdm
Copy link
Contributor

@marcvdm marcvdm commented Oct 24, 2025

This pull request improves the handling and testing of empty string fields in update operations for both contacts and domains APIs. The main focus is to ensure that empty values are correctly passed and validated in the payloads, and that the test infrastructure supports this verification.

Testing improvements for empty fields:

  • Added a new test test_update_with_empty_fields in ContactsApiUpdateTest.php to verify that empty strings for organization, state, and fax are properly sent in the payload when updating a contact.
  • Added a new test test_update_empty_fields in DomainsApiUpdateTest.php to verify that empty values for authcode, ns, and keyData are properly sent in the payload when updating a domain.

API and test infrastructure changes:

  • Updated the update method in ContactsApi.php to check for string type before including organization, state, and fax in the payload, ensuring empty strings are handled correctly.
  • Enhanced the MockedClientFactory::assertRoute helper to accept and validate expected fields in the request body, supporting more robust payload verification in tests. [1] [2]

@PJEilers
Copy link
Contributor

Looks great

@PJEilers PJEilers merged commit 3e6254e into realtimeregister:master Oct 27, 2025
4 checks passed
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.

2 participants