dafiti / web-api-extension
Web API extension for Behat
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 275
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 18
Forks: 128
Type:behat-extension
Requires
- php: ^7.0
- behat/behat: ~3.3
- guzzlehttp/guzzle: ~6
- phpunit/phpunit: 6.0.10
Requires (Dev)
- silex/silex: ~1.3
- symfony/process: ~2.8
This package is not auto-updated.
Last update: 2022-02-19 04:43:12 UTC
README
Provides testing for JSON APIs with Behat 3
Documentation
Steps
Given /^all requests are in JSON$/ Given /^I am authenticating as "([^\"]*)" with "([^\"]*)" password$/ Given /^I set header "([^\"]*)" with value "([^\"]*)"$/ Given /^the response json should have a "([^\"]*)" key$/ Given /^the response json should have a "([^\"]*)" key with value "([^\"]*)"$/ Given /^the key "([^\"]*)" should have a subkey "([^\"]*)"$/ Given /^the key "([^\"]*)" should have a subkey "([^\"]*)" with value (\d+)$/ Given /^the key "([^\"]*)" should have a subkey "([^\"]*)" with value "([^\"]*)?"$/ Given /^the key "([^\"]*)" should have a subkey "([^\"]*)" in index (\d+)$/ Given /^the response json's "([^\"]*)" key should be of type "([^\"]*)"$/ Then /^Set PlaceHolder with key '([^\']*)' and values "([^\"]*)"$/ Then /^Set PlaceHolder with key "([^\"]*)" and values "([^\"]*)"$/ Then /^Set PlaceHolder with key "([^\"]*)" and value "([^\"]*)"$/ Then /^Set PlaceHolder with key "([^\"]*)" and dinamic value "([^\"]*)"$/ Then /^(?:the )?response code should be (\d+)$/ Then /^(?:the )?response should contain "([^\"]*)"$/ Then /^(?:the )?response should not contain "([^\"]*)"$/ Then /^(?:the )?response should contain json:$/ Then print response When /^(?:I )?send a ([A-Z]+) request to "([^\"]+)"$/ When /^(?:I )?send a ([A-Z]+) request to "([^\"]+)" with values:$/ When /^(?:I )?send a ([A-Z]+) request to "([^\"]+)" with body:$/ When /^(?:I )?send a ([A-Z]+) request to "([^\"]+)" with form data:$/
Copyright
Copyright (c) 2014 Konstantin Kudryashov (ever.zet). See LICENSE for details.
Contributors
- Christophe Coevoet stof [lead developer]
- Other awesome developers