-
Notifications
You must be signed in to change notification settings - Fork 6
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/vendor/ | ||
composer.lock |
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/help/swearing /cc @ciaranmcnulty |
||
|
||
## Usage | ||
|
||
|
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' |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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": [ | ||
|
@@ -18,5 +22,10 @@ | |
"psr-4": { | ||
"Roave\\BehatPsrContainer\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"RoaveTest\\BehatPsrContainer\\": "features/bootstrap/" | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 ...
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.