fittinq/symfony-behat-services
最新稳定版本:1.0.3
Composer 安装命令:
composer require fittinq/symfony-behat-services
包简介
README 文档
README
The Symfony Behat Services Bundle provides a set of tools for managing and testing services within your Symfony application. It allows you to define services and their availability, useful for testing scenarios where some services may be unavailable or temporarily disabled.
Table of Contents
Introduction
Testing services within a Symfony application can be challenging, especially when dealing with different service availability scenarios. The Symfony Behat Services Bundle simplifies service management and allows you to control their availability for testing purposes.
Installation
To include the Symfony Behat Services Bundle in your project, follow these steps:
Require the bundle via Composer:
composer require fittinq/symfony-behat-services
Usage
Adding Services
You can add services using a Gherkin scenario like this:
Given there are services
| name | url |
| service1 | http://service1.com |
| service2 | http://service2.com |
Marking Services as Unavailable
You can simulate service unavailability with a Gherkin scenario like this:
Given service1 is unavailable
Configuration
Update your project to include the Behat bundle in your test setup.
default:
default:
paths:
- behat/features
contexts:
- Fittinq\Symfony\Behat\Service\Context\ServiceContext
统计信息
- 总下载量: 1.28k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2022-08-10