PHPackages                             bex/behat-magento2-init - 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. bex/behat-magento2-init

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

bex/behat-magento2-init
=======================

Provides access to magento2 object manager from behat and allows to change magento config settings temporarly

1.0.4(9y ago)1545.3k22MITPHPPHP &gt;=5.4

Since Apr 26Pushed 5y agoCompare

[ Source](https://github.com/tkotosz/behat-magento2-init)[ Packagist](https://packagist.org/packages/bex/behat-magento2-init)[ Docs](https://github.com/tkotosz/behat-magento2-init)[ RSS](/packages/bex-behat-magento2-init/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (2)

Behat-Magento2InitExtension
===========================

[](#behat-magento2initextension)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a594d75694e341baa5fde27c67e4c90f23ab349bbd6baa69f6abb05dd40097d5/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746b6f746f737a2f62656861742d6d6167656e746f322d696e69742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tkotosz/behat-magento2-init/?branch=master)[![Build Status](https://camo.githubusercontent.com/719a7a866ae7bec9358d65def088ca192cb4ea7acbd7818d4fee7f804757722d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746b6f746f737a2f62656861742d6d6167656e746f322d696e69742f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tkotosz/behat-magento2-init/build-status/master)

Behat-Magento2InitExtension provides access to the magento2 object manager through the BaseFixture class and allows you to change magento config settings temporarly when Behat is running.

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

[](#installation)

Install by adding to your `composer.json`:

```
composer require --dev bex/behat-magento2-init
```

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

[](#configuration)

Enable the extension in `behat.yml` like this:

```
default:
  extensions:
    Bex\Behat\Magento2InitExtension: ~
```

You can configure the magento bootstrap file location like this:

```
default:
  extensions:
    Bex\Behat\Magento2InitExtension:
      magento_bootstrap_path: /path/to/app/bootstrap.php
```

You can change magento config settings like this:

```
default:
  extensions:
    Bex\Behat\Magento2InitExtension:
      magento_configs:
        -
          path: 'admin/security/use_form_key'
          value: 0
        -
          path: 'your_module/special_config/awesome_field'
          value: 'somevalue'
          scope_type: 'stores' # allowed values: default, stores, websites; default value: default
          scope_code: 'your_store_code' # the website or store code; default value: null
```

Usage
-----

[](#usage)

When you run behat the extension will

- configure the magento2 object manager automatically, so it will be available in all your fixture class which extends the `Bex\Behat\Magento2InitExtension\Fixtures\BaseFixture` class (see `Bex\Behat\Magento2InitExtension\Fixtures\MagentoConfigManager` as example).
- change the config values before suit and revert the original config values after suit

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~64 days

Total

5

Last Release

3412d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6451ac5fdc814bfa3aec1b3cf746fdb3ccec68ccbbe3a6f30b3b6c9266b0cb79?d=identicon)[tkotosz](/maintainers/tkotosz)

---

Top Contributors

[![adragus-inviqa](https://avatars.githubusercontent.com/u/13104649?v=4)](https://github.com/adragus-inviqa "adragus-inviqa (1 commits)")

---

Tags

BDDTDDBehatmagento2

### Embed Badge

![Health badge](/badges/bex-behat-magento2-init/health.svg)

```
[![Health](https://phpackages.com/badges/bex-behat-magento2-init/health.svg)](https://phpackages.com/packages/bex-behat-magento2-init)
```

###  Alternatives

[polishsymfonycommunity/symfony-mocker-container

Provides base Symfony dependency injection container enabling service mocking.

1468.0M237](/packages/polishsymfonycommunity-symfony-mocker-container)[bex/behat-extension-driver-locator

Driver locator tool for behat extensions

385.2M4](/packages/bex-behat-extension-driver-locator)[ciaranmcnulty/behat-stepthroughextension

Extension for behat to help debug failing scenarios

601.6M5](/packages/ciaranmcnulty-behat-stepthroughextension)[sensiolabs/behat-page-object-extension

Page object extension for Behat

1166.5M27](/packages/sensiolabs-behat-page-object-extension)[bex/behat-step-time-logger

Extension for behat to help find slow scenario steps by logging the step times

261.5M1](/packages/bex-behat-step-time-logger)[bex/behat-magento2-extension

Magento2 extension for Behat

11111.2k](/packages/bex-behat-magento2-extension)

PHPackages © 2026

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