PHPackages                             johnbillion/wordpress-behat-extension - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. johnbillion/wordpress-behat-extension

Abandoned → [paulgibbs/behat-wordpress-extension](/?search=paulgibbs%2Fbehat-wordpress-extension)ArchivedLibrary[Testing &amp; Quality](/categories/testing)

johnbillion/wordpress-behat-extension
=====================================

WordPress extension for Behat 3

0.1.5(8y ago)197.3k5[2 issues](https://github.com/johnbillion/WordPressBehatExtension/issues)MITPHP

Since Mar 16Pushed 8y ago2 watchersCompare

[ Source](https://github.com/johnbillion/WordPressBehatExtension)[ Packagist](https://packagist.org/packages/johnbillion/wordpress-behat-extension)[ RSS](/packages/johnbillion-wordpress-behat-extension/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (13)Used By (0)

WordPress Extension for Behat 3
===============================

[](#wordpress-extension-for-behat-3)

This is a Behat 3.0 Extension for WordPress plugin and theme development. You can use it to test your WordPress installation, or just test your plugin/theme without installing them in a normal WordPress installation (i.e. stand-alone). The Extension allows you to use WordPress functions in your context class (if you extend it from Johnbillion\\WordPressExtension\\Context\\WordPressContext).

Installation
------------

[](#installation)

1. Add a composer development requirement for your WordPress theme or plugin:

    ```
    {
        "require-dev" : {
            "johnbillion/wordpress-behat-extension": "~0.1",
            "johnpbloch/wordpress": "~4.0.0"
        }
    }
    ```
2. Add the following Behat configuration file:

    ```
    default:
      suites:
        default:
          contexts:
            - Johnbillion\WordPressExtension\Context\WordPressContext
      extensions:
        Johnbillion\WordPressExtension:
          path: '%paths.base/vendor/wordpress'

        Behat\MinkExtension:
          base_url:    'http://localhost:8000'
          sessions:
            default:
              goutte: ~
    ```
3. Install the vendors and initialize behat test suites

    ```
    composer update
    vendor/bin/behat --init
    ```
4. Start your development web server and point its document root to the wordpress directory in vendors (without mail function)

    ```
    php -S localhost:8000 -t vendor/wordpress -d disable_functions=mail
    ```
5. Write some Behat features and test them

    ```
    Feature: Manage plugins
        In order to manage plugins
        As an admin
        I need to enable and disable plugins

        Background:
            Given I have a vanilla wordpress installation
                | name          | email                   | username | password |
                | BDD WordPress | your@email.com          | admin    | test     |
            And I am logged in as "admin" with password "test"

        Scenario: Enable the dolly plugin
            Given there are plugins
                | plugin    | status  |
                | hello.php | enabled |
            When I go to "/wp-admin/"
            Then I should see a "#dolly" element

        Scenario: Disable the dolly plugin
            Given there are plugins
                | plugin    | status   |
                | hello.php | disabled |
            When I go to "/wp-admin/"
            Then I should not see a "#dolly" element

    ```
6. Run the tests

    ```
    vendor/bin/behat
    ```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~129 days

Recently: every ~188 days

Total

10

Last Release

3279d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/208434?v=4)[John Blackbourn](/maintainers/johnbillion)[@johnbillion](https://github.com/johnbillion)

---

Top Contributors

[![tmf](https://avatars.githubusercontent.com/u/1573003?v=4)](https://github.com/tmf "tmf (27 commits)")[![wdalmut](https://avatars.githubusercontent.com/u/551974?v=4)](https://github.com/wdalmut "wdalmut (24 commits)")[![johnbillion](https://avatars.githubusercontent.com/u/208434?v=4)](https://github.com/johnbillion "johnbillion (11 commits)")

---

Tags

wordpressBDDBehatstory

### Embed Badge

![Health badge](/badges/johnbillion-wordpress-behat-extension/health.svg)

```
[![Health](https://phpackages.com/badges/johnbillion-wordpress-behat-extension/health.svg)](https://phpackages.com/packages/johnbillion-wordpress-behat-extension)
```

###  Alternatives

[sensiolabs/behat-page-object-extension

Page object extension for Behat

1166.5M27](/packages/sensiolabs-behat-page-object-extension)[dvdoug/behat-code-coverage

Generate Code Coverage reports for Behat tests

593.6M37](/packages/dvdoug-behat-code-coverage)[bex/behat-step-time-logger

Extension for behat to help find slow scenario steps by logging the step times

261.5M1](/packages/bex-behat-step-time-logger)[wdalmut/wordpress-extension

WordPress extension for Behat

131.4k](/packages/wdalmut-wordpress-extension)[soyuka/contexts

Behatch contexts

282.1M11](/packages/soyuka-contexts)[polishsymfonycommunity/symfony2-mocker-extension

Behat extension for mocking services defined in the Symfony2 dependency injection container.

26253.1k4](/packages/polishsymfonycommunity-symfony2-mocker-extension)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
