WordPress extension of the PhpBrowser class.

2.3.4 2020-04-03 11:07 UTC

This package is auto-updated.

Last update: 2020-04-03 17:50:59 UTC


Easy acceptance, functional, integration and unit testing for WordPress plugins, themes and sites using Codeception.

Build Status

wp-browser provides a Codeception based solution to test WordPress plugins, themes and whole sites at all levels of testing.

Find out more here in the documentation.

Installation and setup - the really fast version

Using Composer require wp-browser as a development dependency:

cd my-wordrpess-project
composer require --dev lucatume/wp-browser
vendor/bin/codecept init wpbrowser

Answer the questions and you will be ready to test your project. Find out more about the setup in the project documentation.


The project provides a number of modules to ease the testing of WordPress projects; you can find out more in the modules section of the documentation.
Here's a quick example acceptance test you can write:

// tests/acceptance/PrivatePostsCept.php
$I->haveManyPostsInDatabase(3, ['post_title' => 'Test post {{n}}', 'post_status' => 'private']);

$I->loginAs('subscriber', 'secret');
$I->see('Nothing found');

$I->loginAs('editor', 'secret');
$I->see('Test post 0');
$I->see('Test post 1');
$I->see('Test post 2');

This is just a bite though, find out more in the documentation.