This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IPATH="/Applications/iTunes.app/Contents/MacOS" | |
if [ ! -e "$IPATH/iTunesX" ] | |
then | |
sudo mv "$IPATH/iTunes" "$IPATH/iTunesX" | |
# has sudo failed? | |
if (( $? )) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//PHPUnit | |
public function testApply() { | |
$mock = $this->getMock('My\Foo\Class', array('apply')); | |
$mock->expects($this->any()) | |
->method('apply') | |
->with('foo') | |
->will($this->returnValue('bar')); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Behat\Behat\Context\Context; | |
namespace Context; | |
class RegistrationContext implements Context | |
{ | |
/** | |
* @When I go to the registration page |