mercredi 6 janvier 2016

Testing a CakePHP 3 REST API

I am developing an API on CakePHP 3 using the CRUD Plugin and ADmad's JWT plugin. I've created fixtures for all tables by importing the schema and then defining some dummy records. Now I'd like to know the best way to test my API.

Namely:

  1. How do I set an Authorized user in my tests?
  2. How do I call API methods in the test framework?

I don't have any code to show at the moment because I'm really not sure how to go about this in the correct way.

Aucun commentaire:

Enregistrer un commentaire