L2C2 / wordpress-tests

Improved WordPress tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rationale

WordPress already has an automated testing suite. What you see here is an alternative testing framework, with the following goals:

  • faster
  • runs every test case in a clean WordPress install
  • uses the default PHPUnit runner, instead of custom one
  • doesn't encourage or support the usage of shared/prebuilt fixtures

It uses SQL transactions to clean up automatically after each test.

Requirements

  • WordPress 3.5-alpha
  • phpunit

Installation

  1. Clone the project.
  2. Copy unittests-config-sample.php to unittests-config.php.
  3. Edit the config. USE A NEW DATABASE, BECAUSE ALL THE DATA INSIDE WILL BE DELETED.
  4. $ phpunit all
  5. $ phpunit test_test.php

About

Improved WordPress tests


Languages

Language:PHP 100.0%