Skip to content

Commit

Permalink
Merge pull request #1 from Roave/add-tests
Browse files Browse the repository at this point in the history
Added a feature test to demonstrate injection
  • Loading branch information
asgrim authored Aug 14, 2017
2 parents d3a0849 + 7944fc7 commit 4f5284b
Show file tree
Hide file tree
Showing 10 changed files with 108 additions and 938 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/vendor/
composer.lock
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: php

php:
- 7.1

env:
matrix:
- DEPENDENCIES=""
- DEPENDENCIES="--prefer-lowest --prefer-stable"

before_script:
- composer update --prefer-dist $DEPENDENCIES

script:
- vendor/bin/behat
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Allows injecting services from a PSR-11-compatibile container in a Behat context.

Created with lots of help from @ciaranmcnulty.
Created with lots of help from [@ciaranmcnulty](https://github.com/ciaranmcnulty).

## Usage

Expand Down
11 changes: 11 additions & 0 deletions behat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
default:
suites:
my_suite:
services: "@psr_container"
contexts:
- RoaveTest\BehatPsrContainer\FeatureContext:
- "@RoaveTest\\BehatPsrContainer\\TestService"

extensions:
Roave\BehatPsrContainer\PsrContainerExtension:
container: 'features/bootstrap/example-zend-servicemanager-container.php'
11 changes: 10 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
"require": {
"php": "^7.1",
"behat/behat": "^3.3",
"psr/container": "^1.0"
"psr/container": "^1.0",
"symfony/dependency-injection": "^3.3"
},
"require-dev": {
"zendframework/zend-servicemanager": "^3.3"
},
"license": "MIT",
"authors": [
Expand All @@ -18,5 +22,10 @@
"psr-4": {
"Roave\\BehatPsrContainer\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"RoaveTest\\BehatPsrContainer\\": "features/bootstrap/"
}
}
}
Loading

0 comments on commit 4f5284b

Please sign in to comment.