Skip to content

Conversation

@sheilf-synapse
Copy link

@sheilf-synapse sheilf-synapse commented Dec 23, 2022

Task Link: CF-545

<!-- Run "php synapse_rest/customModule.php" to create a user on integrationy via PHP script -->
<!-- Run  "php vendor/bin/phpunit synapse_rest/test.php"  to create a user on integrationy via Test class -->

Description:

All tests were commented out. It's not clear why that was. There's two potential reasons why:

  • clients may be pulling or forking the repo and creating their own tests (this seems like developer experience with friction)
  • tests were not in a stable condition and they were removed

Test method: testCreateUser()
When uncommenting the tests, I ran into a series of undefined errors across all tests and the constructor. It appeared that there were some structural failures with the API wrapper as it was running into numerous object mismatching and undefined exceptions. The isSet(var) additions in the code are all examples of object mismatching that occurred for one method.

The method was also using unexpected arguments while expecting to pass:

// current use
$testObj = $client->create_user($logins_object, $phoneNumbers_array, $legalnames_array );

// method
function create_user($body, $idempotency_key=null, $newFingerPrint=null) {}

// fix
$testObj = $client->create_user($body);

image

There's a number of things we can do:

  1. Find out if anyone is using the PHP wrapper at all. Slack communications only has a history of use with Microventures years ago, who is still one of our clients, so that may provide useful insight.

  2. Rebuild/refactor the PHP wrapper for stability if the demand is there but the satisfaction is not.

image

@sheilf-synapse sheilf-synapse changed the base branch from master to qa December 23, 2022 22:29
@sheilf-synapse sheilf-synapse changed the title Cf 544 CF-544 Create User Testing Dec 23, 2022
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