Skip to content

wdalmut/WordPressExtension

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

WordPress Extension for Behat

Just a WordPress extension for Behat

Install

Prepare your composer

{
    "require": {
        "wdalmut/wordpress-extension": "*"
    }
}

Configuration

# behat.yml
default:
    extensions:
        Behat\MinkExtension\Extension:
            base_url:    'http://wp.127.0.0.1.xip.io'
            goutte:      ~
            show_cmd: "firefox %s"
        Corley\WordPressExtension\Extension:
            path: "../wordpress"

Add a base WordPress context

Just add the WordPress context

use Corley\WordPressExtension\Context\WordPressContext;

class FeatureContext extends BehatContext
{
    public function __construct(array $parameters)
    {
        //...
        $this->useContext('wordpress', new WordPressContext);
    }
}

Tips

disable_functions=mail

Disable mail() function