Only use SystemContext
To test command lines tool, I do not need http_call services required in Extension::load method.
Do you think it is a good idea to add a parameter to allow to skip http_call loading?
PR is coming if so.
It’s just a service declaration. If you don’t load a class needs it, no instance is created.
I should have begin by that
My composer file:
{
"name": "my/project",
"type": "project",
"require": {
"php": ">=5.4"
},
"require-dev": {
"behatch/contexts": "^2.3"
}
}
My Behat configuration:
default:
suites:
core:
paths:
- %paths.base%/features
contexts:
- FeatureContext
- behatch:system:
root: "."
extensions:
Sanpi\Behatch\Extension: ~
# vendor/bin/behat
[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
The service "behatch.http_call.listener" has a dependency on a non-existent service "mink".
Fool I am
default:
suites:
core:
paths:
- %paths.base%/features
contexts:
- FeatureContext
- Sanpi\Behatch\Context\SystemContext
is working
Ok, we can load the http_call service only if the mink service exist. What do you think?
Sure.
For now, only SystemContext is able to work without http_call service, isn'it?
It would be great to split JsonContext to be able to anlayse Json in a local file for example. It is another story.