Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a feature test to demonstrate injection #1

Merged
merged 4 commits into from
Aug 14, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This documentation still has the "old way" of instantiating a ServiceManager

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean "old" way? That code was taken from a fresh (within the last 2 weeks) Expressive skeleton ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All tge configuration mumbo-jumbo: the servicemanager just accepts ctor config now

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created issue #3 to handle.

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).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/help/swearing

/cc @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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to fix the tags instead, in the services.yml - I'll look at that as a separate change after this is merged though

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok thanks, I'll create a separate issue for it

},
"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