Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Improved WordPress tests (moved to core)
PHP
tree: 233e3d7440

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
lib
.gitignore
README.md
all.php
init.php
phpunit.xml
test_go_to.php
test_test.php
test_texturize.php
unittests-config-sample.php

README.md

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.

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
Something went wrong with that request. Please try again.