No description, website, or topics provided.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Setting Up Your Development Environment with Docker

Note that these instructions will only work within the HabitFree Docker environment and after you've started the Docker environment containers using ./ Follow the instructions at this link before going on.

Set up PHPUnit with WordPress
  1. In terminal, cd into wp-accountability/tests/
  2. wget
  3. chmod +x phpunit.phar
  4. mkdir wordpress-dev
  5. cd wordpress-dev
  6. svn co
  7. cd trunk
  8. cp ../../wp-tests-config.php .
  9. svn up
  10. ../../phpunit.phar

If your installation of phpunit.phar is correct, PHPUnit should attempt to run the WordPress development tests. Otherwise, you should see a lot of html and error messages (commonly mysql connect error messages).

If you get this error:

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

Do this in Debian-based linux:

sudo apt-get install php5-mysql
sudo service apache2 restart

And then try running phpunit.phar again.

Set up PHPUnit testing in PhpStorm
  1. Open the wp-accountability folder in PhpStorm
  2. Open PhpStorm preferences and select Languages > PHP
  3. Select an appropriate interpreter.
  4. Go to Languages > PHP > PHPUnit
  5. Set PHPUnit library to Path to phpunit.phar
  6. Navigate to and select wp-accountability/tests/phpunit.phar such that the full path is shown in the text box
  7. Apply changes and close settings
  8. Right-click tests/phpunit.xml and select "Run phpunit.xml". If all is well, the HabitFree plugin tests should run within PhpStorm.

Want to install the old, terrible, deprecated Bitnami way? Instructions here.