PHPackages                             fortress/contexts - 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. fortress/contexts

ActiveLibrary[Testing &amp; Quality](/categories/testing)

fortress/contexts
=================

Behat contexts

0.1.2(3y ago)04beerwarePHPPHP &gt;=8.0

Since Oct 18Pushed 3y agoCompare

[ Source](https://github.com/Fortress-Digital/behat-contexts)[ Packagist](https://packagist.org/packages/fortress/contexts)[ RSS](/packages/fortress-contexts/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (6)Versions (4)Used By (0)

Behatch contexts
================

[](#behatch-contexts)

Behat contexts provide most common Behat tests.

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

[](#installation)

This extension requires:

- Mink
- Mink extension

### Project dependency

[](#project-dependency)

1. [Install Composer](https://getcomposer.org/download/)
2. Require the package with Composer:

```
$ composer require --dev fortress/behat-contexts

```

3. Activate extension by specifying its class in your `behat.yml`:

```
# behat.yml
default:
    # ...
    extensions:
        Behatch\Extension: ~
```

### Project bootstraping

[](#project-bootstraping)

1. Download the Behatch skeleton with composer:

```
$ php composer.phar create-project behatch/skeleton

```

Browser, json, table and rest step need a mink configuration, see [Mink extension](https://github.com/Behat/MinkExtension) for more information.

Usage
-----

[](#usage)

In `behat.yml`, enable desired contexts:

```
default:
    suites:
        default:
            contexts:
                - behatch:context:browser
                - behatch:context:debug
                - behatch:context:system
                - behatch:context:json
                - behatch:context:table
                - behatch:context:rest
                - behatch:context:xml
```

### Examples

[](#examples)

This project is self-tested, you can explore the [features directory](./tests/features) to find some examples.

Configuration
-------------

[](#configuration)

- `browser` - more browser related steps (like mink)
    - `timeout` - default timeout
- `debug` - helper steps for debugging
    - `screenshotDir` - the directory where store screenshots
- `system` - shell related steps
    - `root` - the root directory of the filesystem
- `json` - JSON related steps
    - `evaluationMode` - javascript "foo.bar" or php "foo-&gt;bar"
- `table` - play with HTML the tables
- `rest` - send GET, POST, ... requests and test the HTTP headers
- `xml` - XML related steps

### Configuration Example

[](#configuration-example)

For example, if you want to change default directory to screenshots - you can do it this way:

```
default:
    suites:
        default:
            contexts:
                - behatch:context:debug:
                    screenshotDir: "var"
```

Translation
-----------

[](#translation)

[![See more information on Transifex.com](https://camo.githubusercontent.com/26cc720af99f6e76a5fca51d9a14d9843efe813fd5d0c565cb4c949094c7bf6c/68747470733a2f2f7777772e7472616e73696665782e636f6d2f70726f6a656374732f702f626568617463682d636f6e74657874732f7265736f757263652f656e786c6966662f63686172742f696d6167655f706e67)](https://www.transifex.com/projects/p/behatch-contexts/)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.4% 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 ~0 days

Total

3

Last Release

1307d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/610bdb821ab68c17414a0c06451188e70fdff24b6b131a9e82d96ebf9b8c1541?d=identicon)[brash-creative](/maintainers/brash-creative)

---

Top Contributors

[![sanpii](https://avatars.githubusercontent.com/u/113045?v=4)](https://github.com/sanpii "sanpii (461 commits)")[![tophsic](https://avatars.githubusercontent.com/u/930980?v=4)](https://github.com/tophsic "tophsic (7 commits)")[![chorry](https://avatars.githubusercontent.com/u/699112?v=4)](https://github.com/chorry "chorry (7 commits)")[![dunglas](https://avatars.githubusercontent.com/u/57224?v=4)](https://github.com/dunglas "dunglas (7 commits)")[![tyx](https://avatars.githubusercontent.com/u/245494?v=4)](https://github.com/tyx "tyx (6 commits)")[![gpenverne](https://avatars.githubusercontent.com/u/401993?v=4)](https://github.com/gpenverne "gpenverne (6 commits)")[![davialexandre](https://avatars.githubusercontent.com/u/388373?v=4)](https://github.com/davialexandre "davialexandre (5 commits)")[![soyuka](https://avatars.githubusercontent.com/u/1321971?v=4)](https://github.com/soyuka "soyuka (5 commits)")[![EmmanuelVella](https://avatars.githubusercontent.com/u/663607?v=4)](https://github.com/EmmanuelVella "EmmanuelVella (5 commits)")[![pborreli](https://avatars.githubusercontent.com/u/77759?v=4)](https://github.com/pborreli "pborreli (4 commits)")[![razbakov](https://avatars.githubusercontent.com/u/298778?v=4)](https://github.com/razbakov "razbakov (4 commits)")[![gimler](https://avatars.githubusercontent.com/u/200904?v=4)](https://github.com/gimler "gimler (4 commits)")[![ilovemistakes](https://avatars.githubusercontent.com/u/1580540?v=4)](https://github.com/ilovemistakes "ilovemistakes (4 commits)")[![paul-crashley](https://avatars.githubusercontent.com/u/307618?v=4)](https://github.com/paul-crashley "paul-crashley (3 commits)")[![jdecool](https://avatars.githubusercontent.com/u/433926?v=4)](https://github.com/jdecool "jdecool (3 commits)")[![areyt](https://avatars.githubusercontent.com/u/1827073?v=4)](https://github.com/areyt "areyt (3 commits)")[![GabrielCW](https://avatars.githubusercontent.com/u/15729946?v=4)](https://github.com/GabrielCW "GabrielCW (3 commits)")[![matts2cant](https://avatars.githubusercontent.com/u/1333408?v=4)](https://github.com/matts2cant "matts2cant (3 commits)")[![tekante](https://avatars.githubusercontent.com/u/223075?v=4)](https://github.com/tekante "tekante (3 commits)")[![badaz](https://avatars.githubusercontent.com/u/5735255?v=4)](https://github.com/badaz "badaz (3 commits)")

---

Tags

symfonyBDDContextBehatapi-platform

### Embed Badge

![Health badge](/badges/fortress-contexts/health.svg)

```
[![Health](https://phpackages.com/badges/fortress-contexts/health.svg)](https://phpackages.com/packages/fortress-contexts)
```

###  Alternatives

[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)[dmarynicz/behat-parallel-extension

Parallel extension for Behat

27544.3k](/packages/dmarynicz-behat-parallel-extension)[marcortola/behat-seo-contexts

Behat extension for testing some On-Page SEO factors: meta title/description, canonical, hreflang, meta robots, robots.txt, redirects, sitemap validation, HTML validation, performance...

13153.8k](/packages/marcortola-behat-seo-contexts)

PHPackages © 2026

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