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 today

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 72% 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

3876d 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

[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k251.7M11.6k](/packages/symfony-framework-bundle)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.7M1.0k](/packages/phpro-grumphp)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k28.9M2.4k](/packages/infection-infection)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[wp-cli/wp-cli-tests

WP-CLI testing framework

423.1M142](/packages/wp-cli-wp-cli-tests)

PHPackages © 2026

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