wpveda book

  Edit This Page

Unit Testing


  1. Setup
  2. using wp-cli
  3. run atleast wordpress test cases to make sure that your code doesn't break any test cases
  4. write unit tests


  1. phpunit
  2. nodejs based tool (not sure if they are needed as phpunit is used everywhere by wordpress plugins)


  1. WordPress core - https://make.wordpress.org/core/handbook/automated-testing/
  2. Pippin's tutorial - https://pippinsplugins.com/series/unit-tests-wordpress-plugins/