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

ActiveLibrary

vccw-team/wordpress-extension
=============================

WordPress extension for the Behat

1.2.4(8y ago)12339↓100%3[3 issues](https://github.com/vccw-team/wordpress-extension/issues)MITPHP

Since Nov 5Pushed 8y ago2 watchersCompare

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

READMEChangelog (10)Dependencies (6)Versions (13)Used By (0)

WordPress Extension for the Behat/Mink
======================================

[](#wordpress-extension-for-the-behatmink)

[![Build Status](https://camo.githubusercontent.com/d05177918a50c48f05d950567f1f130821d056ac1058981a9bb3ab60a69679a0/68747470733a2f2f7472617669732d63692e6f72672f766363772d7465616d2f776f726470726573732d6d696e6b2d657874656e73696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/vccw-team/wordpress-mink-extension)[![Latest Stable Version](https://camo.githubusercontent.com/488327c652ecb5e163598a7f1aa90463097f63a0ae09114b35015c913abfc6d0/68747470733a2f2f706f7365722e707567782e6f72672f766363772d7465616d2f776f726470726573732d657874656e73696f6e2f762f737461626c65)](https://packagist.org/packages/vccw-team/wordpress-extension)[![Total Downloads](https://camo.githubusercontent.com/ba00045d54a54147cd9de4d22702f449324a7f8632b530e9ad10a5053171cbb8/68747470733a2f2f706f7365722e707567782e6f72672f766363772d7465616d2f776f726470726573732d657874656e73696f6e2f646f776e6c6f616473)](https://packagist.org/packages/vccw-team/wordpress-extension)[![Latest Unstable Version](https://camo.githubusercontent.com/2af8996af7271dc93de319899c71691b748609142b1694af1300b1ecc75425f2/68747470733a2f2f706f7365722e707567782e6f72672f766363772d7465616d2f776f726470726573732d657874656e73696f6e2f762f756e737461626c65)](https://packagist.org/packages/vccw-team/wordpress-extension)[![License](https://camo.githubusercontent.com/8412b0ca4623f4cb11d9320fb6e28690372f630aaa4e56fa33688d7a00010fe9/68747470733a2f2f706f7365722e707567782e6f72672f766363772d7465616d2f776f726470726573732d657874656e73696f6e2f6c6963656e7365)](https://packagist.org/packages/vccw-team/wordpress-extension)

Requires
--------

[](#requires)

- WordPress 4.6 or later
- PHP 5.6 or later

Getting Started
---------------

[](#getting-started)

### Install dependencies

[](#install-dependencies)

The recomended way to install is by using Composer.

```
$ composer require vccw-team/wordpress-extension:@stable

```

### Initialize Behat

[](#initialize-behat)

After that you will be able to initialize the project.

```
$ vendor/bin/behat --init

```

### Configuration

[](#configuration)

Place the `behat.yml` like following.

```
default:
  suites:
    default:
      paths:
        - %paths.base%/features
      contexts:
        - FeatureContext
        - VCCW\Behat\Mink\WordPressExtension\Context\WordPressContext
        - Behat\MinkExtension\Context\MinkContext
  extensions:
    VCCW\Behat\Mink\WordPressExtension:
      roles:
        administrator:
          username: admin
          password: admin
        editor:
          username: editor
          password: editor
    Behat\MinkExtension:
      base_url: http://127.0.0.1:8080
      default_session: default
      sessions:
        default:
          selenium2:
            wd_host: http://127.0.0.1:4444/wd/hub
        goutte:
          goutte: ~

```

- Add user accounts of your WordPress site into `VCCW\Behat\Mink\WordPressExtension > roles`.
- Update value of the `Behat\MinkExtension > base_url` to your hostname.
- You can add multiple user like following.

```
  extensions:
    VCCW\Behat\Mink\WordPressExtension:
      roles:
        administrator:
          username: admin
          password: admin
        editor:
          username: editor
          password: editor

```

See:

### Write features

[](#write-features)

You can write features with Gherkin language.

Example `*.feature` are in the following.

#### Examples

[](#examples)

Login as the administrator role and I should see "Dashboard".

```
Feature: I login as the specfic role

  Scenario: Login as the "administrator" role

    When I login as the "administrator" role
    Then I should see "Welcome to WordPress!"

```

Selenium2 driver can't retrieve the HTTP response. So you have to use `@mink::goutte` tag like following in your `*.feature`. But goutte driver can't exec JavaScript.

```
Feature: HTTP response

  @mink:goutte
  Scenario: Check http status code

    When I am on "/"
    Then the HTTP status should be 200

    When I am on "/the-page-not-found"
    Then the HTTP status should be 404

```

Run to see contexts.

```
$ vendor/bin/behat -di --lang=en

```

### Install headless browser

[](#install-headless-browser)

Following is an exmaple for PhantomJS.

```
$ npm install phantomjs-prebuilt --save
$ node_modules/.bin/phantomjs --webdriver=4444 --ignore-ssl-errors=yes --cookies-file=/tmp/webdriver_cookie.txt

```

### Run tests

[](#run-tests)

```
$ vendor/bin/behat

```

### Running tests as npm-scripts

[](#running-tests-as-npm-scripts)

Following is an example to run phantomjs and tests automatically.

Save following as `bin/run-tests.js`.

```
const phantomjs = require( 'phantomjs-prebuilt' )
const spawn = require( 'child_process' ).spawn

const argv = process.argv
argv.shift()
argv.shift()

phantomjs.run(
  '--webdriver=4444',
  '--ignore-ssl-errors=yes',
  '--cookies-file=/tmp/webdriver_cookie.txt'
).then( program => {
  const behat = spawn( 'vendor/bin/behat', argv, { stdio: "inherit" } )
  behat.on( 'exit', ( code ) => {
    program.kill()
    process.exit( code );
  } )
} )

```

Add it to `package.json`.

```
{
  "scripts": {
    "test": "/usr/bin/env node bin/run-tests.js"
  },
}

```

Then just run:

```
$ npm test

```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 96% 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 ~34 days

Recently: every ~75 days

Total

11

Last Release

3125d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1366a673de80559a738e11fb4bd3600842f45ebc21abe8e2842e7205686a3ca0?d=identicon)[miya0001](/maintainers/miya0001)

---

Top Contributors

[![miya0001](https://avatars.githubusercontent.com/u/309946?v=4)](https://github.com/miya0001 "miya0001 (170 commits)")[![Ippey](https://avatars.githubusercontent.com/u/471948?v=4)](https://github.com/Ippey "Ippey (5 commits)")[![fumikito](https://avatars.githubusercontent.com/u/84587?v=4)](https://github.com/fumikito "fumikito (1 commits)")[![hideokamoto](https://avatars.githubusercontent.com/u/6883571?v=4)](https://github.com/hideokamoto "hideokamoto (1 commits)")

---

Tags

behatminkphantomjswordpress

### Embed Badge

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

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

###  Alternatives

[drupal/drupal-extension

Drupal extension for Behat

22215.1M147](/packages/drupal-drupal-extension)[drevops/behat-steps

Collection of steps for Behat

25381.7k3](/packages/drevops-behat-steps)[devinci/devinci-behat-extension

Provides extra behat goodies.

17593.9k](/packages/devinci-devinci-behat-extension)[elkan/behatformatter

This will create a formatter for Behat 3! Fast, Easy and Pretty!

1739.8k](/packages/elkan-behatformatter)

PHPackages © 2026

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