gavinrunsdavies / ipswich-jaffa-results-api

Wordpress Plugin for the JAFFA results
1 stars 0 forks source link

Consider integration tests for your WP REST API endpoints #5

Open danielbachhuber opened 8 years ago

danielbachhuber commented 8 years ago

Hi!

On behalf of Pantheon, I'm writing a tutorial on why integration tests are critical for your WP REST API endpoints, and how you can go about writing them.

Given your use of register_rest_field(), I think you could benefit from reading and applying the tutorial. And, because the tutorial isn't yet published, I'd very much appreciate any constructive criticism you have, so that we can make the tutorial an evergreen resource for the community.

Thanks in advance for your time. Happy to take any questions, comments, etc. you might have in this Github issue, or on the document itself (you'll need to be signed into Dropbox).

gavinrunsdavies commented 8 years ago

Hi Daniel, thanks for your feedback. I absolutely 100% agree that any codebase should have tests, either unit or integration. I had been using Postman to do some dev testing but agree that some integration tests would be of great benefit.

I've never used a testing framework for php before as most of my work in this language is my private and I've only started using Github to version my work and share between my work and home.

I will give the article a read. From an initial scan it looks good.

danielbachhuber commented 8 years ago

I will give the article a read. From an initial scan it looks good.

Glad to hear :) Let me know if you have questions about it.