composer require --dev macpaw/behat-api-contextIf you're using Symfony Flex, the bundle will be registered automatically.
// config/bundles.php
return [
BehatApiContext\BehatApiContextBundle::class => ['test' => true],
];By default, the bundle provides the following configuration:
This bundle does not yet include a Symfony recipe to automatically create the configuration file. If you need a specific configuration, you have to add it manually.
Recipe in progress
# behat.yml
default:
suites:
default:
contexts:
- BehatApiContext\Context\ApiContextYou can also add your own reset manager by overriding the configuration manually in config/packages/behat_api_context.yaml:
# config/packages/behat_api_context.yaml
when@test:
behat_api_context:
kernel_reset_managers:
- BehatApiContext\Service\ResetManager\DoctrineResetManager