Skip to content

Sublime Text 2 Snippets for Behat and Mink - write really really fast BDD

Notifications You must be signed in to change notification settings

zuDevonRW/sublime-behat-snippets

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 

Repository files navigation

#Sublime Behat Snippets

Speed up your bdd writes!

nb: for Mink snippets, please use Mink folder.

Installation

Clone the repo in your personal SublimeText2/Packages folder.

Basic Usage

The snippets are easily accessible by just typing the triggerNames followed by the tab key.

Fill in then the placeholders with the needed values

Available snippets (triggerNames)

Behat

feature

Feature: (Your feature)
	In order to (to what?)
	As a (as a what?)
	I need (what da ya need?)

scenario

Scenario: (Scenario Description)
	Given I (Given?)
	And (And?)
	When I (when?)
	Then I (then?)

iHave

/**
* @Given /I have a (What da ya hav?) "([^"]*)"/
*/
public function iHaveA(What da ya hav?)($name)
{
	//(Your code here...)
}

iShould

/**
* @Then /I should (What should ya do?) "([^"]*)" in category "([^"]*)"/
*/
public function iShould(CamelShould)(Arguments)
{
	//Your code here
}
Rapid Snippets

giha => Given I have a aiha => And I have a ...

Mink

minkSession

$session = new \Behat\Mink\Session($driver);
$session->start();

minkContent

$content = $session->getPage()->getContent();

Todo's

  • Add more snippets for Behat
  • Add Mink snippets

Feel free to improve this package

About

Sublime Text 2 Snippets for Behat and Mink - write really really fast BDD

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published