We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I noticed that when you have two (or more) services of the same class, only the last one seems to take effect.
Config in behat.yml.dist:
.... default: extensions: FriendsOfBehat\ContextServiceExtension: imports: - "vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml" - "tests/Behat/Resources/contexts.yml" - "tests/Behat/Resources/pages.yml" ... cached: extensions: FriendsOfBehat\ContextServiceExtension: imports: - "vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml"
Steps to reproduce:
namespace Tests\Behat\Context\Hook; use Behat\Behat\Context\Context; /** * @author Wojciech Górski <[email protected]> */ class Something implements Context { /** * @var string */ private $message; /** * @param string $message */ public function __construct($message) { $this->message = $message; } /** * @BeforeScenario */ public function doThings() { echo 'Does things for: ' . $this->message; } }
2.)
In my Resources/contexts/hook.yml:
Resources/contexts/hook.yml
something_first: class: Tests\Behat\Context\Hook\Something arguments: ["first"] tags: - { name: fob.context_service } something_second: class: Tests\Behat\Context\Hook\Something arguments: ["second"] tags: - { name: fob.context_service }
Now hook them up within the contexts_services:
contexts_services
- something_first - something_second
Now when I run my tests I can only see output for the something_second service ("Does things for: second")
something_second
The text was updated successfully, but these errors were encountered:
It looks like ContextServiceExtension's issue, can you report it there? :)
Sorry, something went wrong.
Done.
Moved to: FriendsOfBehat/ContextServiceExtension#13
No branches or pull requests
I noticed that when you have two (or more) services of the same class, only the last one seems to take effect.
Config in behat.yml.dist:
Steps to reproduce:
2.)
In my
Resources/contexts/hook.yml
:Now hook them up within the
contexts_services
:Now when I run my tests I can only see output for the
something_second
service ("Does things for: second")The text was updated successfully, but these errors were encountered: