Write your tests, then write code to make your test pass and finally refactor your functional code
Dependency Manager for PHP
$ composer create-project wp-cli/wp-cli --no-dev
A command line interface for WordPress
$ wp scaffold plugin demo
Testing framework for PHP
setUp() method is run just before each and every test method.
tearDown() is run just after each and every test method.
setUpBeforeClass() and tearDownAfterClass() are called before the first test and after the last test, respectively.
Failed asserting that an array contains 4
Failed asserting that 0 matches expected 1
A Wordpress's plugin to setting up posts as test data
Failed assert: Undefined index: factory-women
Failed assert: call to undefined method insert_posts()
Failed asserting that 0 matches expected 5
Failed asserting that ' ' contains "prueba"