Comments (5)
You can try it by using gatherContexts() method
I am using it like this:
https://github.com/OskarStark/SonataAdminBehatContext/blob/master/src/Context/SonataAdminContext.php
from contexts.
I've tried this snippet but I still getting the calling private method
exception.
from contexts.
Can you share your behat.yaml please?
from contexts.
@tsantos84 have you tried something like that?
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
class YourContext implements Context {
(...)
/**
* @BeforeScenario
*/
public function gatherContext(BeforeScenarioScope $beforeSuiteScope)
{
$env = $beforeSuiteScope->getEnvironment();
$this->restContext = $env->getContext(RestContext::class);
}
from contexts.
Hi guys. Sorry for the very long reply. I think my initial issue were with some symfony/behat/behatch version. I've just make a fresh install and now I can access Behatch context from my custom one.
from contexts.
Related Issues (20)
- Typo in RestContext HOT 1
- Make tests green again HOT 8
- Deprecate php5
- Way to easy adjust lots of wait for 'element' HOT 2
- Documentation HOT 3
- Rest Context - Send Request with Parameters Bug HOT 5
- BC break (or bug) with sending POST request with array HOT 2
- [JsonContext] How to handle integers as strings?
- [RestContext] Arrays in request
- Can't add header Authorization for jwt token HOT 6
- Unable to use step "the JSON should be valid according to swagger :dumpPath dump schema :schemaName"
- Cookies are emptied between requests. HOT 5
- The service "environment.manager" has a dependency on a non-existent service "behatch.http_call.request".
- Support Symfony 5 packages HOT 3
- \Behatch\HttpCall\HttpCallListener::afterStep() can cause Call to a member function source() on null HOT 2
- Step "the response should be in JSON" is already defined in Behatch\Context\JsonContext::theResponseShouldBeInJson() HOT 1
- Fix Travis CI
- Update PHP and Symfony minimal versions
- symfony 5 Test json schema but response of rest context is symfony response
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from contexts.