Search code examples
phpparse-platformparse-server

Parse Server mocking for Testing


I'm using Parse server in my php applicaiton, Now I want to test my php app using phpunit every thing goes well but how I can test or mock Parse server "PHP SDK" in my test case ,Any ideas?!


Solution

  • A good place to start is to see how unit tests are done in the parse php sdk.

    Rather than mocking parse-server, the sdk spins up a test parse-server with an in memory, empty mongo.

    Take a look at the contributing guide for step by step directions on how to get the tests to run.