Skip to content

Commit a47356c

Browse files
committed
add behat with hello world example
1 parent a2b0b7b commit a47356c

File tree

12 files changed

+440
-10
lines changed

12 files changed

+440
-10
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@
2424
/.php_cs
2525
/.php_cs.cache
2626
###< friendsofphp/php-cs-fixer ###
27+
28+
###> behat/symfony2-extension ###
29+
behat.yml
30+
###< behat/symfony2-extension ###

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ install:
2727

2828
script:
2929
- ./vendor/bin/phpunit
30+
- ./vendor/bin/behat
3031
# this checks that the source code follows the Symfony Code Syntax rules
3132
- './vendor/bin/php-cs-fixer --config=.php_cs.dist fix --diff --dry-run -v'
3233
# this checks that the YAML config files contain no syntax errors

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,14 @@ log: ## Follow logs on local dev server
2323
stop: ## Stop local dev server
2424
symfony server:stop
2525

26-
test: ## Run phpunit
26+
test:phpunit ## Run all tests
27+
test:behat
28+
29+
phpunit: ## Run phpunit
2730
vendor/bin/phpunit
2831

32+
behat: ## Run behat
33+
vendor/bin/behat
34+
2935
fix-style: ## Run php-cs-fixer
3036
vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v

behat.yml.dist

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
default:
2+
suites:
3+
default:
4+
contexts:
5+
- FeatureContext:
6+
kernel: '@kernel'
7+
8+
extensions:
9+
Behat\Symfony2Extension:
10+
kernel:
11+
bootstrap: features/bootstrap/bootstrap.php
12+
class: App\Kernel

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
"php": ">=7.4.0",
88
"ext-ctype": "*",
99
"ext-iconv": "*",
10+
"ext-json": "*",
1011
"symfony/console": "4.4.*",
1112
"symfony/dotenv": "4.4.*",
1213
"symfony/flex": "^1.3.1",
1314
"symfony/framework-bundle": "4.4.*",
1415
"symfony/yaml": "4.4.*"
1516
},
1617
"require-dev": {
18+
"behat/behat": "^3.7",
19+
"behat/symfony2-extension": "^2.1",
1720
"friendsofphp/php-cs-fixer": "^2.16",
1821
"nelmio/cors-bundle": "^2.1",
1922
"phpunit/phpunit": "^9.4",

0 commit comments

Comments
 (0)