Created
September 22, 2013 13:29
-
-
Save wouterj/6659907 to your computer and use it in GitHub Desktop.
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 | |
| // ... | |
| class FeatureContext extends MinkContext | |
| { | |
| protected $guestsName; | |
| // ... | |
| /** | |
| * @Given /I am a guest named "([^"]+)"/ | |
| */ | |
| public function nameGuest($name) | |
| { | |
| $this->guestsName = $name; | |
| } | |
| /** | |
| * @Given /I fill out the guest book form/ | |
| */ | |
| public function fillGuestBookForm() | |
| { | |
| $this->fillField('name', $this->guestsName); | |
| // ... | |
| } | |
| } |
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: GuestBook | |
| In order to track all of my visitors | |
| As an admin | |
| I want to give users the ability to sign my guestbook | |
| Background: | |
| Given I am a guest named "John Doe" | |
| Scenario: With Valid Credentials | |
| Given there are no guests | |
| And I am on "guests/create" | |
| And I fill out the guest book form | |
| Then I should see "Guest Book" | |
| And I should see "John Doe" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment