Comments (8)
Scrutinizer would be probably happy too if the rest context is rewritten: https://scrutinizer-ci.com/g/Behatch/contexts/issues/master/files/src/Context/RestContext.php?selectedLabels[0]=9&orderField=path&order=asc
from contexts.
I just push a new branch browser-kit fixed this issue. Feedback welcome 😃
from contexts.
@sanpii I've just pulled the browser-kit branch and run the tests and I'm getting the same error.
Call to undefined method Symfony\Component\HttpKernel\Client::setHeader()
from contexts.
Any thoughts on this? I am using it along with a https://github.com/laracasts/Behat-Laravel-Extension could there be a conflict? Perhaps I'm not configuring be behatch properly?
default:
extensions:
Laracasts\Behat: ~
Sanpi\Behatch\Extension: ~
Behat\MinkExtension:
show_cmd: "/Applications/Safari.app/Contents/MacOS/Safari %s"
default_session: laravel
laravel: ~
suites:
default:
contexts:
- FeatureContext
- Behat\MinkExtension\Context\MinkContext
- behatch:json
- behatch:rest
from contexts.
Has anyone been able to set headers with the REST context here? I could really use it, I've tried to have a look myself but I can't figure out how to fix it myself.
from contexts.
Like @koorb, we are not able to set headers with the I add :name header equal to :value
step.
I tried the browser-kit branch too and I have this issue:
PHP Fatal error: Call to undefined method Symfony\Bundle\FrameworkBundle\Client::setHeader() in /home/fsevestre/workspace/broadcast-api/broadcast-api/vendor/behatch/contexts/src/HttpCall/Request/Goutte.php on line 64
Symfony 2.7
My behat.yml
:
default:
calls:
error_reporting: 16383 # E_ALL & ~E_USER_DREPRECATED
suites:
default:
type: symfony_bundle
bundle: 'AppBundle'
paths: [ %paths.base%/src/AppBundle/Tests/Features ]
contexts:
- AppBundle\Tests\Features\Context\FeatureContext: { doctrine: "@doctrine" }
- AppBundle\Tests\Features\Context\JsonContext
- AppBundle\Tests\Features\Context\SecurityContext: { container: "@service_container" }
- Behat\MinkExtension\Context\MinkContext
- Knp\FriendlyContexts\Context\AliceContext
- Sanpi\Behatch\Context\RestContext
extensions:
Behat\Symfony2Extension:
kernel:
env: "test"
debug: "true"
Behat\MinkExtension:
base_url: "http://broadcast-api.dev"
sessions:
default:
symfony2: ~
Sanpi\Behatch\Extension: ~
Knp\FriendlyContexts\Extension:
alice:
fixtures:
...
dependencies: ~
from contexts.
@koorb @fsevestre The browser-kit
branch is outdated as far as I can tell. My PR should work.
from contexts.
I add :name header equal to :value
step is now working as expected on my app (I can finally remove all my TODOs
:))
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
- How to access RestContext from my custom context? 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.