Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
wdalmut committed Mar 22, 2014
2 parents 0fd7463 + 1c40c72 commit 4b198dd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Corley/WordPressExtension/Context/WordPressContext.php
Expand Up @@ -19,6 +19,8 @@
class WordPressContext extends MinkContext
{
/**
* Create a new WordPress website from scratch
*
* @Given /^\w+ have|has a vanilla wordpress installation$/
*/
public function installWordPress(TableNode $table = null)
Expand Down Expand Up @@ -47,6 +49,10 @@ public function installWordPress(TableNode $table = null)
}

/**
* Add these users to this wordpress installation
*
* @see wp_insert_user
*
* @Given /^there are users$/
*/
public function thereAreUsers(TableNode $table)
Expand All @@ -59,6 +65,10 @@ public function thereAreUsers(TableNode $table)
}

/**
* Add these posts to this wordpress installation
*
* @see wp_insert_post
*
* @Given /^there are posts$/
*/
public function thereArePosts(TableNode $table)
Expand All @@ -71,6 +81,10 @@ public function thereArePosts(TableNode $table)
}

/**
* Activate/Deactivate plugins
* | plugin | status |
* | plugin/name.php | enabled |
*
* @Given /^there are plugins$/
*/
public function thereArePlugins(TableNode $table)
Expand All @@ -86,6 +100,8 @@ public function thereArePlugins(TableNode $table)


/**
* Login into the reserved area of this wordpress
*
* @Given /^I am logged in as "([^"]*)" with password "([^"]*)"$/
*/
public function login($username, $password)
Expand Down
Expand Up @@ -39,6 +39,7 @@ public function beforeSuite(SuiteEvent $event)
$_SERVER['HTTP_HOST'] = $url["host"];
$PHP_SELF = $GLOBALS['PHP_SELF'] = $_SERVER['PHP_SELF'] = '/index.php';

define( 'WP_INSTALLING', true );
require_once $this->path . '/wp-config.php';
}
}

0 comments on commit 4b198dd

Please sign in to comment.