定制 fittinq/symfony-behat-services 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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:

  1. 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
  • 点击次数: 1
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2022-08-10