Skip to content

Files

Latest commit

9c12f6c · Jan 5, 2016

History

History
This branch is 21 commits behind tyxla/carbon-breadcrumbs:master.

tests

Carbon Breadcrumbs Unit Tests

Initial Setup

  1. Install PHPUnit by following their installation guide. If you've installed it correctly, this should display the version:

    $ phpunit --version

  2. Install WordPress and the WP Unit Test lib using the install.sh script. Change to the plugin root directory and type:

    $ tests/bin/install.sh [db-host]

Sample usage:

$ tests/bin/install.sh carbon_breadcrumbs_tests root root

Important: Make sure that the <db-name> database has been created. Note that all data will be removed during testing.

Running Tests

Simply change to the plugin root directory and type:

$ phpunit

Refer to the phpunit command line test runner reference for more information and command line options.