Skip to content

Instantly share code, notes, and snippets.

@Axxiss
Last active December 15, 2015 05:49
Show Gist options
  • Save Axxiss/5212105 to your computer and use it in GitHub Desktop.
Save Axxiss/5212105 to your computer and use it in GitHub Desktop.
class FeatureContext extends MinkContext
implements KernelAwareInterface
{
private $kernel;
private $parameters;
/**
* Initializes context with parameters from behat.yml.
*
* @param array $parameters
*/
public function __construct(array $parameters)
{
$this->parameters = $parameters;
}
/**
* Sets HttpKernel instance.
* This method will be automatically called by Symfony2Extension ContextInitializer.
*
* @param KernelInterface $kernel
*/
public function setKernel(KernelInterface $kernel)
{
$this->kernel = $kernel;
}
/**
* @Given /^There is no "([^"]*)" in database$/
*/
public function thereIsNoInDatabase($arg1)
{
//delete table
}
/**
* @Given /^the following users:$/
*/
public function theFollowingUsers(TableNode $table)
{
//iterate table and create users
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment