Skip to content
This repository was archived by the owner on Aug 12, 2018. It is now read-only.

Commit d03cf52

Browse files
committed
init behat, add first (failing) scenario
1 parent e5f5052 commit d03cf52

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

features/basic.feature

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Feature: Basic examples
2+
In order to show basic Behat functionality
3+
As devclub speaker
4+
I need to be able to run very basic tests
5+
6+
Scenario: See welcome text on homepage
7+
Given I am on homepage
8+
Then I should see "Hello Devclub!"
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
use Behat\Behat\Context\ClosuredContextInterface,
4+
Behat\Behat\Context\TranslatedContextInterface,
5+
Behat\Behat\Context\BehatContext,
6+
Behat\Behat\Exception\PendingException;
7+
use Behat\Gherkin\Node\PyStringNode,
8+
Behat\Gherkin\Node\TableNode;
9+
10+
use Behat\Behat\Context\Step\Then;
11+
12+
use Behat\MinkExtension\Context\MinkContext;
13+
14+
/**
15+
* Features context.
16+
*/
17+
class FeatureContext extends MinkContext
18+
{
19+
protected $app;
20+
21+
/**
22+
* Initializes context.
23+
* Every scenario gets it's own context object.
24+
*
25+
* @param array $parameters context parameters (set them up through behat.yml)
26+
*/
27+
public function __construct(array $parameters)
28+
{
29+
$this->app = new AppKernel();
30+
}
31+
}

0 commit comments

Comments
 (0)