PHPackages                             elbformat/symfony-behat-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. elbformat/symfony-behat-bundle

ActiveSymfony-bundle[Testing &amp; Quality](/categories/testing)

elbformat/symfony-behat-bundle
==============================

Predefined, extensible behat contexts for symfony applications.

v1.5.12(3mo ago)011.2k↓23.1%2[1 issues](https://github.com/elbformat/symfony-behat-bundle/issues)[21 PRs](https://github.com/elbformat/symfony-behat-bundle/pulls)2MITPHPPHP &gt;=8.1

Since Jun 15Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/elbformat/symfony-behat-bundle)[ Packagist](https://packagist.org/packages/elbformat/symfony-behat-bundle)[ RSS](/packages/elbformat-symfony-behat-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (59)Used By (2)

symfony-behat-bundle
====================

[](#symfony-behat-bundle)

This bundle provides reusable behat contexts for symfony applications. All steps are written in present tense, as suggested on

Features
--------

[](#features)

- [CommandContext](doc/context/CommandContext.md) to test symfony commands.
- [DateContext](doc/context/DateContext.md) to mock the current date.
- [FormContext](doc/context/FormContext.md) to test/manipulate/fill html forms.
- [HtmlContext](doc/context/HtmlContext.md) to check the DOM/plain HTTP response.
- [HttpContext](doc/context/HttpContext.md) for simple HTTP interactions.
- [JsonContext](doc/context/JsonContext.md) to send or check json data in request/response.
- [LoggingContext](doc/context/LoggingContext.md) to verify correct logging.
- [MailerContext](doc/context/MailerContext.md) to check if mails were triggered.
- [AbstractApiContext](doc/context/AbstractApiContext.md) to help implementing custom context for external API interaction.
- [AbstractDatabaseContext](doc/context/AbstractDatabaseContext.md) to help implementing custom context with database interaction.

Installation
------------

[](#installation)

Add to your composer requirements as dev dependency.

```
$ composer require --dev elbformat/symfony-behat-bundle
```

Activate bundle in your `config/bundles.php`

```
Elbformat\SymfonyBehatBundle\ElbformatSymfonyBehatBundle::class => ['test' => true],
```

Use contexts in your `behat.yml` as you like

```
default:
  extensions:
    FriendsOfBehat\SymfonyExtension:
      bootstrap: tests/bootstrap.php
      kernel:
        path: src/Kernel.php
        class: App\Kernel
        environment: behat
        debug: false
  suites:
    default:
      contexts:
        - Elbformat\SymfonyBehatBundle\Context\CommandContext
        - Elbformat\SymfonyBehatBundle\Context\DateContext
        - Elbformat\SymfonyBehatBundle\Context\FormContext
        - Elbformat\SymfonyBehatBundle\Context\HtmlContext
        - Elbformat\SymfonyBehatBundle\Context\HttpContext
        - Elbformat\SymfonyBehatBundle\Context\JsonContext
        - Elbformat\SymfonyBehatBundle\Context\LoggingContext
        - Elbformat\SymfonyBehatBundle\Context\MailerContext
```

### Mailer

[](#mailer)

To make the Test-Mailer work, you need to set the mailer dsn in `config/packages/mailer.yaml`

```
when@test:
    framework:
        mailer:
            dsn: 'test://test'

```

### API

[](#api)

To not send requests to a real api, you should configure the MockClient to be used in `config/packages/framework.yaml`

```
when@test:
    framework:
        http_client:
            mock_response_factory: Elbformat\SymfonyBehatBundle\HttpClient\MockClientCallback

```

Examples
--------

[](#examples)

Examples can be found in [dock/examples.md](doc/examples.md).

Updating
--------

[](#updating)

When updating from a previous version, see the [changelog](doc/changelog.md) for changes.

What's next?
------------

[](#whats-next)

The next release should likely contain more tests/stability improvements.

Development
-----------

[](#development)

If you want to develop on the bundle you will find useful information in [doc/development.md](doc/development.md)

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance85

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 84.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~65 days

Recently: every ~58 days

Total

21

Last Release

117d ago

PHP version history (2 changes)v1.0.0PHP &gt;=7.4

v1.3.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/c9968aaccc87c900fd5ae77c88cbec3bf36f3f1f61aff0b70c32dadcf70cd1be?d=identicon)[hgiesenow](/maintainers/hgiesenow)

---

Top Contributors

[![hgiesenow](https://avatars.githubusercontent.com/u/4929980?v=4)](https://github.com/hgiesenow "hgiesenow (22 commits)")[![yumengglaetsch](https://avatars.githubusercontent.com/u/256357403?v=4)](https://github.com/yumengglaetsch "yumengglaetsch (2 commits)")[![LarsKrafft](https://avatars.githubusercontent.com/u/104077341?v=4)](https://github.com/LarsKrafft "LarsKrafft (1 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (1 commits)")

---

Tags

symfonyBehat

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/elbformat-symfony-behat-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/elbformat-symfony-behat-bundle/health.svg)](https://phpackages.com/packages/elbformat-symfony-behat-bundle)
```

###  Alternatives

[robertfausk/behat-panther-extension

Symfony Panther extension for Behat

341.7M87](/packages/robertfausk-behat-panther-extension)[soyuka/contexts

Behatch contexts

282.1M11](/packages/soyuka-contexts)[novaway/common-contexts

Novaway Behat common contexts

18187.8k3](/packages/novaway-common-contexts)[macpaw/behat-messenger-context

Behat Context for testing Symfony Messenger component

16232.9k](/packages/macpaw-behat-messenger-context)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
