PHPackages                             arisro/behat-lumen-extension - 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. arisro/behat-lumen-extension

ActiveBehat-extension[Testing &amp; Quality](/categories/testing)

arisro/behat-lumen-extension
============================

Lumen extension for Behat

v2.0.1(10y ago)52.5k13[4 issues](https://github.com/arisro/behat-lumen-extension/issues)[3 PRs](https://github.com/arisro/behat-lumen-extension/pulls)MITPHPPHP &gt;=5.4

Since Jul 9Pushed 8y ago2 watchersCompare

[ Source](https://github.com/arisro/behat-lumen-extension)[ Packagist](https://packagist.org/packages/arisro/behat-lumen-extension)[ RSS](/packages/arisro-behat-lumen-extension/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (4)Used By (0)

This version (v2.0.1) is compatible with Lumen 5.2; for older versions use v1.0.0.
----------------------------------------------------------------------------------

[](#this-version-v201-is-compatible-with-lumen-52-for-older-versions-use-v100)

This is an adaptation for Lumen of the Laravel Behat Extension package ().

It's a custom Behat / Mink driver which extends the BrowserKit driver.

This will allow you to write functional tests using Behat (boot the Lumen application in a custom environment, mock components from the FeatureContext, requests are done directly on the application - no external requests).

To get started, you only need to follow a few steps:

1. Install Dependencies
=======================

[](#1-install-dependencies)

As always, we need to pull in some dependencies through Composer.

```
composer require behat/behat behat/mink behat/mink-extension arisro/behat-lumen-extension --dev

```

This will give us access to Behat, Mink, and, of course, the Lumen extension.

If you want to use a custom .env file for the Behat tests you will need to modify `bootstrap/app.php` like this:

```
try {
    (new Dotenv\Dotenv(__DIR__.'/../', isset($dotEnvFile) ?: '.env'))->load();
} catch (Dotenv\Exception\InvalidPathException $e) {
    //
}
```

2. Create the behat.yml configuration file
==========================================

[](#2-create-the-behatyml-configuration-file)

Next, within your project root, create a `behat.yml` file, and add:

```
default:
  autoload: [ %paths.base%/tests/functional/contexts ]
  extensions:
    Arisro\Behat\ServiceContainer\LumenExtension:
      # env_file: .env.behat
    Behat\MinkExtension:
      default_session: lumen
      lumen: ~
  suites:
    default:
      paths: [ %paths.base%/tests/functional/features ]
      filters:
      contexts:
        - FeatureContext
```

Optinally, you can specify a different .env file for your functional tests (with a test DB for example).

3. Write Some Features
======================

[](#3-write-some-features)

You have a very small example here .

Note: if you want to leverage some of the Mink helpers in your `FeatureContext` file, then be sure to extend `Behat\MinkExtension\Context\MinkContext`.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance4

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 87.5% 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 ~129 days

Total

3

Last Release

3707d ago

Major Versions

v1.0.0 → v2.0.02016-02-11

### Community

Maintainers

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

---

Top Contributors

[![arisro](https://avatars.githubusercontent.com/u/788280?v=4)](https://github.com/arisro "arisro (7 commits)")[![maximebeaudoin](https://avatars.githubusercontent.com/u/3246184?v=4)](https://github.com/maximebeaudoin "maximebeaudoin (1 commits)")

---

Tags

BDDlumenBehatextension

### Embed Badge

![Health badge](/badges/arisro-behat-lumen-extension/health.svg)

```
[![Health](https://phpackages.com/badges/arisro-behat-lumen-extension/health.svg)](https://phpackages.com/packages/arisro-behat-lumen-extension)
```

###  Alternatives

[laracasts/behat-laravel-extension

Laravel extension for Behat

2611.3M12](/packages/laracasts-behat-laravel-extension)[dmarynicz/behat-parallel-extension

Parallel extension for Behat

27544.3k](/packages/dmarynicz-behat-parallel-extension)[bex/behat-extension-driver-locator

Driver locator tool for behat extensions

385.2M4](/packages/bex-behat-extension-driver-locator)[soulcodex/laravel-behat

Laravel Extension for easy integration with Behat

1760.8k](/packages/soulcodex-laravel-behat)[zalas/behat-no-extension

The ultimate Behat extension

31137.9k1](/packages/zalas-behat-no-extension)[polishsymfonycommunity/symfony2-mocker-extension

Behat extension for mocking services defined in the Symfony2 dependency injection container.

26253.1k4](/packages/polishsymfonycommunity-symfony2-mocker-extension)

PHPackages © 2026

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