PHPackages                             tmf/wordpress-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. tmf/wordpress-extension

ActiveLibrary[Testing &amp; Quality](/categories/testing)

tmf/wordpress-extension
=======================

WordPress extension for Behat 3

v0.1.1(10y ago)96.4k4[1 PRs](https://github.com/tmf/WordPressExtension/pulls)1MITPHP

Since Mar 16Pushed 10y ago2 watchersCompare

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

READMEChangelog (2)Dependencies (5)Versions (9)Used By (1)

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 Tmf\\WordPressExtension\\Context\\WordPressContext).

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

[](#installation)

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

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

    ```
    default:
      suites:
        default:
          contexts:
            - Tmf\WordPressExtension\Context\WordPressContext
      extensions:
        Tmf\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

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.6% of commits — single point of failure

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 ~123 days

Recently: every ~153 days

Total

6

Last Release

3830d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/216cd4bf21dbff1de4f4a7f2992123132d4cc21f265831ef69bdbc1f5228035e?d=identicon)[tmf](/maintainers/tmf)

---

Top Contributors

[![tmf](https://avatars.githubusercontent.com/u/1573003?v=4)](https://github.com/tmf "tmf (30 commits)")[![wdalmut](https://avatars.githubusercontent.com/u/551974?v=4)](https://github.com/wdalmut "wdalmut (24 commits)")[![mackensen](https://avatars.githubusercontent.com/u/553370?v=4)](https://github.com/mackensen "mackensen (1 commits)")[![phillprice](https://avatars.githubusercontent.com/u/320214?v=4)](https://github.com/phillprice "phillprice (1 commits)")

---

Tags

wordpressBDDBehatstory

### Embed Badge

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

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

###  Alternatives

[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)[polishsymfonycommunity/symfony2-mocker-extension

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

26253.1k4](/packages/polishsymfonycommunity-symfony2-mocker-extension)[novaway/common-contexts

Novaway Behat common contexts

18187.8k3](/packages/novaway-common-contexts)[marcortola/behat-seo-contexts

Behat extension for testing some On-Page SEO factors: meta title/description, canonical, hreflang, meta robots, robots.txt, redirects, sitemap validation, HTML validation, performance...

13153.8k](/packages/marcortola-behat-seo-contexts)[soulcodex/laravel-behat

Laravel Extension for easy integration with Behat

1760.8k](/packages/soulcodex-laravel-behat)

PHPackages © 2026

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