zayon / behat-gather-context-extension

Behat 扩展,用于自动收集上下文

v0.0.3 2023-03-27 07:50 UTC

This package is auto-updated.

Last update: 2024-09-27 17:16:07 UTC


README

目录

安装

与 PHP 7.4 及更高版本兼容。

与 Behat 3.0.0 及更高版本兼容

  1. 使用 Composer 安装此扩展
composer require --dev zayon/behat-gather-context-extension
  1. 在 Behat 配置中启用它
# behat.yaml.dist / behat.yaml

default:
  extensions:
    Zayon\BehatGatherContextExtension\ContextGathererExtension: ~

使用方法

<?php
# tests/Behat/DemoContext.php

namespace Acme\Tests\Behat;

use Behat\Behat\Context\Context;

final class DemoContext implements Context
{
    // a beforeScenario hook will automatically be created to gather AnotherContext
    private AnotherContext $anotherContext;
}

版本管理和发布周期

此包遵循 语义版本控制

许可证

此扩展完全免费,并以宽松的 MIT 许可证 发布。