Skip to content

Instantly share code, notes, and snippets.

Konstantin Kudryashov everzet

Block or report user

Report or block everzet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View RegistrationContext.php
use Behat\Behat\Context\Context;
namespace Context;
class RegistrationContext implements Context
* @When I go to the registration page
View gist:5722238
public function testApply() {
$mock = $this->getMock('My\Foo\Class', array('apply'));
everzet / bad_steps_proposition.php
Created Jun 7, 2011 — forked from alexandresalome/gist:1012539
Explaining why classes are not possible in Behat as step definitions
View bad_steps_proposition.php
You can't use classes like this to define steps by the simple reason:
in Behat and Cucumber, step definitions and test contexts ARE two
splitted logical elements, not one. Different step definitions
can be used together in different scenarios and each scenario will
have it's own context (environment) object. That's the main logical
idea behind Behat - define step once - use it everywhere.
View new_study.feature
Feature: New Study
In order to create a new Study
As a Researcher
I must be able to enter information about the study and save it
Scenario Outline: Researcher adds new study
When I enter <study name>
And I enter <short url>
And I enter <welcome text>
And I set self registration to <self registration>
if [ ! -e "$IPATH/iTunesX" ]
sudo mv "$IPATH/iTunes" "$IPATH/iTunesX"
# has sudo failed?
if (( $? ))
You can’t perform that action at this time.